File indexing completed on 2024-06-23 04:27:43
0001 /* 0002 * SPDX-FileCopyrightText: 1982 Donald H. House <x@unknown.com> 0003 * SPDX-FileCopyrightText: 1989 Robert Allen <x@unknown.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 #ifndef _GAUSS_H_ 0008 #define _GAUSS_H_ 0009 0010 class gauss 0011 { 0012 public: 0013 /** 0014 * This function takes as parameters real valued mean and 0015 * standard-deviation, and an integer valued seed. It returns a 0016 * real number which may be interpreted as a sample of a normally 0017 * distributed (Gaussian) random variable with the specified mean 0018 * and standard deviation. After the first call to gauss, the seed 0019 * parameter is ignored. 0020 * 0021 * The computational technique used is to pass a uniformly 0022 * distributed random number through the inverse of the Normal 0023 * Distribution function. 0024 */ 0025 static double gaussian(double, double, int); 0026 }; 0027 0028 #endif