Home | Develop | Download | Contact
example_congruential_create.cpp

Programa para el testeo de las funciones.

Programa para el testeo de las funciones.Para compilar o código example_congruential_create.cpp:

g++ -static -o example_congruential_create example_congruential_create.cpp -lpdsramm

Para executar o programa:

./example_congruential_create

Retornando por consola:

A.GetA(): 1103515245    A.GetC(): 3     A: 1
B.GetA(): 1103515245    B.GetC(): 9     B: 1
A.GetA(): 1103515245    A.GetC(): 3     A: 1103515248
B.GetA(): 1103515245    B.GetC(): 9     B: 1103515254
A.GetA(): 1103515245    A.GetC(): 3     A: 133531059
B.GetA(): 1103515245    B.GetC(): 9     B: 312171591
A.GetA(): 1103515245    A.GetC(): 3     A: 230192954
B.GetA(): 1103515245    B.GetC(): 9     B: 674098244
A.GetA(): 1103515245    A.GetC(): 3     A: 2092593077
B.GetA(): 1103515245    B.GetC(): 9     B: 438456573
A.GetA(): 1103515245    A.GetC(): 3     A: 1147713044
B.GetA(): 1103515245    B.GetC(): 9     B: 1979158978
A.GetA(): 1103515245    A.GetC(): 3     A: 1871158919
B.GetA(): 1103515245    B.GetC(): 9     B: 652094371
A.GetA(): 1103515245    A.GetC(): 3     A: 846569854
B.GetA(): 1103515245    B.GetC(): 9     B: 1626750576
A.GetA(): 1103515245    A.GetC(): 3     A: 951985833
B.GetA(): 1103515245    B.GetC(): 9     B: 176076217
A.GetA(): 1103515245    A.GetC(): 3     A: 1752429560
B.GetA(): 1103515245    B.GetC(): 9     B: 426229198
A.GetA(): 1103515245    A.GetC(): 3     A: 2005168283
B.GetA(): 1103515245    B.GetC(): 9     B: 139760831
A.GetA(): 1103515245    A.GetC(): 3     A: 815082498
B.GetA(): 1103515245    B.GetC(): 9     B: 1544521564
A.GetA(): 1103515245    A.GetC(): 3     A: 779639005
B.GetA(): 1103515245    B.GetC(): 9     B: 2063772213
A.GetA(): 1103515245    A.GetC(): 3     A: 1279208476
B.GetA(): 1103515245    B.GetC(): 9     B: 1241292442
A.GetA(): 1103515245    A.GetC(): 3     A: 1878937583
B.GetA(): 1103515245    B.GetC(): 9     B: 1040085915
A.GetA(): 1103515245    A.GetC(): 3     A: 763157190
B.GetA(): 1103515245    B.GetC(): 9     B: 829584136
A.GetA(): 1103515245    A.GetC(): 3     A: 1677032017
B.GetA(): 1103515245    B.GetC(): 9     B: 1828153969
A.GetA(): 1103515245    A.GetC(): 3     A: 107987584
B.GetA(): 1103515245    B.GetC(): 9     B: 1278001190
A.GetA(): 1103515245    A.GetC(): 3     A: 970510467
B.GetA(): 1103515245    B.GetC(): 9     B: 1425892407
A.GetA(): 1103515245    A.GetC(): 3     A: 959099338
B.GetA(): 1103515245    B.GetC(): 9     B: 1576430964
A.GetA(): 1103515245    A.GetC(): 3     A: 630537989
B.GetA(): 1103515245    B.GetC(): 9     B: 855503469
A.GetA(): 1103515245    A.GetC(): 3     A: 2090687268
B.GetA(): 1103515245    B.GetC(): 9     B: 1129016946
A.GetA(): 1103515245    A.GetC(): 3     A: 580699735
B.GetA(): 1103515245    B.GetC(): 9     B: 15778451
A.GetA(): 1103515245    A.GetC(): 3     A: 2138633486
B.GetA(): 1103515245    B.GetC(): 9     B: 310223520
A.GetA(): 1103515245    A.GetC(): 3     A: 939432697
B.GetA(): 1103515245    B.GetC(): 9     B: 248184361
A.GetA(): 1103515245    A.GetC(): 3     A: 3529224
B.GetA(): 1103515245    B.GetC(): 9     B: 580171134
A.GetA(): 1103515245    A.GetC(): 3     A: 697058667
B.GetA(): 1103515245    B.GetC(): 9     B: 1712433839
A.GetA(): 1103515245    A.GetC(): 3     A: 1235363986
B.GetA(): 1103515245    B.GetC(): 9     B: 1239481996
A.GetA(): 1103515245    A.GetC(): 3     A: 894681645
B.GetA(): 1103515245    B.GetC(): 9     B: 1856178597
A.GetA(): 1103515245    A.GetC(): 3     A: 1436640044
B.GetA(): 1103515245    B.GetC(): 9     B: 586768714
A.GetA(): 1103515245    A.GetC(): 3     A: 32940479
B.GetA(): 1103515245    B.GetC(): 9     B: 1762588811
A.GetA(): 1103515245    A.GetC(): 3     A: 335876182
B.GetA(): 1103515245    B.GetC(): 9     B: 1369189688

Código example_congruential_create.cpp:

#include <cmath>
#include <Pds/Ra>
int main(void)
{
for(unsigned int n=0;n<32;n++)
{
std::cout<<"A.GetA(): "<<A.GetA()<<"\tA.GetC(): "<<A.GetC()<<"\tA: "<<A.GetValue()<<"\n";
std::cout<<"B.GetA(): "<<B.GetA()<<"\tB.GetC(): "<<B.GetC()<<"\tB: "<<B.GetValue()<<"\n";
}
return 0;
}
La clase tipo Pds::Congruential . Esta clase genera un objeto con dos parametros Nlin y Ncol....
unsigned long int GetC(void) const
Retorna el parámetro .
unsigned long int GetA(void) const
Retorna el parámetro .
unsigned long int GetValue(void)
Pide una muestra de la Random Variable.

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed