Changes in / [342:3e906e6c08a9:341:f8832dc16d45] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/random.h
r340 r339 541 541 /// @{ 542 542 543 ///\name Initialization 544 /// 545 /// @{ 546 543 547 /// \brief Default constructor 544 548 /// … … 705 709 } 706 710 711 /// @} 712 713 ///\name Uniform distributions 714 /// 715 /// @{ 716 707 717 /// \brief Returns a random real number from the range [0, 1) 708 718 /// … … 761 771 return _random_bits::IntConversion<Number, Word>::convert(core); 762 772 } 773 774 /// @} 763 775 764 776 unsigned int uinteger() { … … 795 807 ///\name Non-uniform distributions 796 808 /// 809 797 810 ///@{ 798 811 799 /// \brief Returns a random bool with given probability of true result.812 /// \brief Returns a random bool 800 813 /// 801 814 /// It returns a random bool with given probability of true result. … … 804 817 } 805 818 806 /// Standard normal (Gauss)distribution807 808 /// Standard normal (Gauss)distribution.819 /// Standard Gauss distribution 820 821 /// Standard Gauss distribution. 809 822 /// \note The Cartesian form of the Box-Muller 810 823 /// transformation is used to generate a random normal distribution. … … 819 832 return std::sqrt(-2*std::log(S)/S)*V1; 820 833 } 821 /// Normal (Gauss)distribution with given mean and standard deviation822 823 /// Normal (Gauss)distribution with given mean and standard deviation.834 /// Gauss distribution with given mean and standard deviation 835 836 /// Gauss distribution with given mean and standard deviation. 824 837 /// \sa gauss() 825 838 double gauss(double mean,double std_dev) … … 852 865 /// lognormal(). 853 866 std::pair<double,double> lognormalParamsFromMD(double mean, 854 867 double std_dev) 855 868 { 856 869 double fr=std_dev/mean; … … 860 873 } 861 874 /// Lognormal distribution with given mean and standard deviation 862 875 863 876 /// Lognormal distribution with given mean and standard deviation. 864 877 /// … … 867 880 return lognormal(lognormalParamsFromMD(mean,std_dev)); 868 881 } 869 882 870 883 /// Exponential distribution with given mean 871 884 … … 971 984 ///\name Two dimensional distributions 972 985 /// 986 973 987 ///@{ 974 988 … … 987 1001 return dim2::Point<double>(V1,V2); 988 1002 } 989 /// A kind of two dimensional normal (Gauss)distribution1003 /// A kind of two dimensional Gauss distribution 990 1004 991 1005 /// This function provides a turning symmetric two-dimensional distribution.
Note: See TracChangeset
for help on using the changeset viewer.