Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 5588 for trunk/tango/math

Show
Ignore:
Timestamp:
10/27/10 09:44:08 (2 years ago)
Author:
fawzi
Message:

* fixes bugs in uniformR2Distribution

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/math/random/Random.d

    r5539 r5588  
    979979        RandomG r; 
    980980        /// initializes the probability distribution 
    981         static UniformRDistribution create(RandomG r,T from, T to){ 
    982             UniformRDistribution res; 
     981        static UniformR2Distribution create(RandomG r,T from, T to){ 
     982            UniformR2Distribution res; 
    983983            res.r=r; 
    984984            res.from=from; 
     
    987987        } 
    988988        /// chainable call style initialization of variables (thorugh a call to randomize) 
    989         UniformRDistribution opCall(U,S...)(ref U a,S args){ 
     989        UniformR2Distribution opCall(U,S...)(ref U a,S args){ 
    990990            randomize(a,args); 
    991991            return *this; 
     
    996996        } 
    997997        /// initialize a 
    998         U randomize(ref U a){ 
     998        U randomize(U)(ref U a){ 
    999999            return r.randomizeUniformR2!(U,T,T,boundCheck)(a,from,to); 
    10001000        } 
     
    11411141        return UniformRSymmDistribution!(T,false,isFloat!(T)).create(this,to); 
    11421142    } 
    1143     /// uniform distribution [from;to) fro ints and (from;to) for reals 
     1143    /// uniform distribution [from;to) for ints and (from;to) for reals 
    11441144    UniformR2Distribution!(T,true) uniformR2D(T)(T from, T to){ 
    11451145        return UniformR2Distribution!(T,true).create(this,from,to);