public double Uniform( double lowerBound, double upperBound) { UniformDistribution.ValidateBounds( lowerBound, upperBound); double sample; unsafe { SafeNativeMethods.VSL.vdRngUniform( 0, this.descriptor.DangerousGetHandle().ToPointer(), 1, &sample, lowerBound, upperBound); } return(sample); }
public int DiscreteUniform( int lowerBound, int upperBound) { UniformDistribution.ValidateBounds( lowerBound, upperBound); int sample; unsafe { SafeNativeMethods.VSL.viRngUniform( 0, this.descriptor.DangerousGetHandle().ToPointer(), 1, &sample, lowerBound, upperBound); } return(sample); }