... | ... |
@@ -693,13 +693,13 @@ |
693 | 693 |
/// |
694 | 694 |
|
695 | 695 |
///@{ |
696 | 696 |
|
697 | 697 |
/// \brief Returns a random bool |
698 | 698 |
/// |
699 |
/// It returns a random bool with given probability of true result |
|
699 |
/// It returns a random bool with given probability of true result. |
|
700 | 700 |
bool boolean(double p) { |
701 | 701 |
return operator()() < p; |
702 | 702 |
} |
703 | 703 |
|
704 | 704 |
/// Standard Gauss distribution |
705 | 705 |
|
... | ... |
@@ -716,13 +716,13 @@ |
716 | 716 |
S=V1*V1+V2*V2; |
717 | 717 |
} while(S>=1); |
718 | 718 |
return std::sqrt(-2*std::log(S)/S)*V1; |
719 | 719 |
} |
720 | 720 |
/// Gauss distribution with given mean and standard deviation |
721 | 721 |
|
722 |
/// Gauss distribution with given mean and standard deviation |
|
722 |
/// Gauss distribution with given mean and standard deviation. |
|
723 | 723 |
/// \sa gauss() |
724 | 724 |
double gauss(double mean,double std_dev) |
725 | 725 |
{ |
726 | 726 |
return gauss()*std_dev+mean; |
727 | 727 |
} |
728 | 728 |
|
... | ... |
@@ -806,13 +806,13 @@ |
806 | 806 |
|
807 | 807 |
///\name Two dimensional distributions |
808 | 808 |
/// |
809 | 809 |
|
810 | 810 |
///@{ |
811 | 811 |
|
812 |
/// Uniform distribution on the full unit circle |
|
812 |
/// Uniform distribution on the full unit circle |
|
813 | 813 |
|
814 | 814 |
/// Uniform distribution on the full unit circle. |
815 | 815 |
/// |
816 | 816 |
dim2::Point<double> disc() |
817 | 817 |
{ |
818 | 818 |
double V1,V2; |
0 comments (0 inline)