#include "SdlArs.h"
#include "include.h"
#include "newran.h"
Include dependency graph for newran.cpp:
Go to the source code of this file.
|
Definition at line 7 of file newran.cpp. |
|
Definition at line 127 of file newran.cpp. Referenced by Binomial::Binomial(), Binomial2::Binomial2(), MixedRandom::Build(), AsymGen::Build(), PosGen::Build(), ChiSq::ChiSq(), DiscreteGen::DiscreteGen(), Gamma::Gamma(), DiscreteGen::Gen(), MixedRandom::MixedRandom(), RandomPermutation::Next(), operator *(), Random::operator()(), operator+(), operator-(), operator/(), operator|(), Poisson::Poisson(), and Poisson2::Poisson2().
00127 { Throw(Bad_alloc("Newran: out of space")); } |
|
Definition at line 609 of file newran.cpp. References Real. Referenced by Binomial1::Binomial1(), Binomial2::Binomial2(), Poisson1::Density(), Binomial1::Density(), NegativeBinomial::Density(), Gamma1::Gamma1(), Gamma2::Gamma2(), NegativeBinomial::NegativeBinomial(), TestBinomial(), TestNegativeBinomial(), and TestPoisson().
00610 { 00611 // log gamma function adapted from numerical recipes in C 00612 00613 if (xx<1.0) // Use reflection formula 00614 { 00615 double piz = 3.14159265359 * (1.0-xx); 00616 return log(piz/sin(piz))-ln_gamma(2.0-xx); 00617 } 00618 else 00619 { 00620 static double cof[6]={76.18009173,-86.50532033,24.01409822, 00621 -1.231739516,0.120858003e-2,-0.536382e-5}; 00622 00623 double x=xx-1.0; double tmp=x+5.5; 00624 tmp -= (x+0.5)*log(tmp); double ser=1.0; 00625 for (int j=0;j<=5;j++) { x += 1.0; ser += cof[j]/x; } 00626 return -tmp+log(2.50662827465*ser); 00627 } 00628 } |
|
Definition at line 733 of file newran.cpp. References ErrorNoSpace().
00734 { 00735 MultipliedRandom* r = new MultipliedRandom(rv1, rv2); 00736 if (!r) ErrorNoSpace(); return *r; 00737 } |
|
Definition at line 703 of file newran.cpp. References ErrorNoSpace().
00704 { 00705 ScaledRandom* r = new ScaledRandom(rv, s); 00706 if (!r) ErrorNoSpace(); return *r; 00707 } |
|
Definition at line 685 of file newran.cpp. References ErrorNoSpace().
00686 { 00687 ScaledRandom* r = new ScaledRandom(rv, s); 00688 if (!r) ErrorNoSpace(); return *r; 00689 } |
|
Definition at line 884 of file newran.cpp. References ErrorNoSpace().
00886 { 00887 AddedSelectedRandom* r = new AddedSelectedRandom(rv1, rv2); 00888 if (!r) ErrorNoSpace(); return *r; 00889 } |
|
Definition at line 877 of file newran.cpp. References ErrorNoSpace().
00879 { 00880 AddedSelectedRandom* r = new AddedSelectedRandom(rv1, rv2); 00881 if (!r) ErrorNoSpace(); return *r; 00882 } |
|
Definition at line 870 of file newran.cpp. References ErrorNoSpace().
00872 { 00873 AddedSelectedRandom* r = new AddedSelectedRandom(rv1, rv2); 00874 if (!r) ErrorNoSpace(); return *r; 00875 } |
|
Definition at line 863 of file newran.cpp. References ErrorNoSpace().
00865 { 00866 AddedSelectedRandom* r = new AddedSelectedRandom(rv1, rv2); 00867 if (!r) ErrorNoSpace(); return *r; 00868 } |
|
Definition at line 721 of file newran.cpp. References ErrorNoSpace().
00722 { 00723 AddedRandom* r = new AddedRandom(rv1, rv2); 00724 if (!r) ErrorNoSpace(); return *r; 00725 } |
|
Definition at line 691 of file newran.cpp. References ErrorNoSpace().
00692 { 00693 ShiftedRandom* r = new ShiftedRandom(rv, s); 00694 if (!r) ErrorNoSpace(); return *r; 00695 } |
|
Definition at line 673 of file newran.cpp. References ErrorNoSpace().
00674 { 00675 ShiftedRandom* r = new ShiftedRandom(rv, s); 00676 if (!r) ErrorNoSpace(); return *r; 00677 } |
|
Definition at line 739 of file newran.cpp. References ErrorNoSpace().
00740 { 00741 SubtractedRandom* r = new SubtractedRandom(rv1, rv2); 00742 if (!r) ErrorNoSpace(); return *r; 00743 } |
|
Definition at line 697 of file newran.cpp. References ErrorNoSpace().
00698 { 00699 ReverseShiftedRandom* r = new ReverseShiftedRandom(rv, s); 00700 if (!r) ErrorNoSpace(); return *r; 00701 } |
|
Definition at line 679 of file newran.cpp. References ErrorNoSpace().
00680 { 00681 ShiftedRandom* r = new ShiftedRandom(rv, -s); 00682 if (!r) ErrorNoSpace(); return *r; 00683 } |
|
Definition at line 667 of file newran.cpp. References ErrorNoSpace().
00668 { 00669 NegatedRandom* r = new NegatedRandom(rv); 00670 if (!r) ErrorNoSpace(); return *r; 00671 } |
|
Definition at line 745 of file newran.cpp. References ErrorNoSpace().
00746 { 00747 DividedRandom* r = new DividedRandom(rv1, rv2); 00748 if (!r) ErrorNoSpace(); return *r; 00749 } |
|
Definition at line 715 of file newran.cpp. References ErrorNoSpace().
00716 { 00717 ReciprocalRandom* r = new ReciprocalRandom(rv, s); 00718 if (!r) ErrorNoSpace(); return *r; 00719 } |
|
Definition at line 709 of file newran.cpp. References ErrorNoSpace().
00710 { 00711 ScaledRandom* r = new ScaledRandom(rv, 1.0/s); 00712 if (!r) ErrorNoSpace(); return *r; 00713 } |
|
Definition at line 727 of file newran.cpp. References ErrorNoSpace().
00728 { 00729 OredRandom* r = new OredRandom(rv1, rv2); 00730 if (!r) ErrorNoSpace(); return *r; 00731 } |
|
Definition at line 125 of file newran.cpp.
00125 { return x*x; }
|
|
Definition at line 124 of file newran.cpp. References Real.
00124 { return x*x; }
|