From: Todd V. <tve...@ex...> - 2000-05-20 16:01:07
|
Normal<T> wants these constructor arguments: Normal(T mean, T standardDeviation) If you want a unit normal distribution, use the class NormalUnit<T>. See http://oonumerics.org/blitz/manual/blitz08.html#index00442 Cheers, Todd Patrick Guio wrote: > > > Dear all > > I am tryng to use the Normal distribution of blitz but I get compilation > error. Does anybody has any idea of what is the problem, here is the code > > ..... > 105: // Initialise f > 106: Normal<double> normalGen; > 107: normalGen.seed = 1; > 108: Array<double,1> R(f.numElements); > 109: for (int i=0; i<f.numElements; i++) R(i)=normalGen.random(); > 110: f = 1.0; > 111: f += 0.05*R; > .... > > And the g++ (2.95.2) gives me the following message > > mudfas.cc:106: no matching function for call to > `ranlib::Normal<double,ranlib::MersenneTwister,ranlib::sharedState>::Normal > ()' > /mn/aurora/u1/patricg/src/blitz/random/normal.h:87: candidates > are: ranlib::Normal<double,ranlib::MersenneTwister,ranlib::sharedState>::Normal(double, > double) > /mn/aurora/u1/patricg/src/blitz/random/normal.h:101: ranlib::Normal<double,ranlib::MersenneTwister,ranlib::sharedState>::Normal(const > ranlib::Normal<double,ranlib::MersenneTwister,ranlib::sharedState> &) > mudfas.cc:107: invalid use of member (did you forget the `&' ?) > mudfas.cc:108: no matching function for call to > `blitz::Array<double,1>::Array ({unknown type})' > > Sincerely > > Patrick Guio > > ====================================================================== > > Patrick Guio > The Auroral Observatory, University of Tromsø > N-9037 Tromsø, Norway > Tel : (+47) 77 64 56 75 - Fax : (+47) 77 64 62 80 > E-mail : pa...@ph... > URL : http://www.phys.uit.no > > --------------------- blitz-support list -------------------------------- > * To subscribe/unsubscribe: use the handy web form at > http://oonumerics.org/blitz/lists.html > > -- Todd Veldhuizen tve...@ac... Indiana Univ. Comp. Sci. http://extreme.indiana.edu/~tveldhui/ --------------------- blitz-support list -------------------------------- * To subscribe/unsubscribe: use the handy web form at http://oonumerics.org/blitz/lists.html |