Algs4Net Class Library Documentation
Algs4Net Class Library Documentation
Algs4Net
StdRandom Class
StdRandom Methods
Uniform Method
Uniform Method
Uniform Method (Int32)
Uniform Method (Double, Double)
Uniform Method (Int32, Int32)
StdRandom
Uniform Method (Int32, Int32)
Returns a random integer uniformly in [a, b).
Namespace:
Algs4Net
Assembly:
Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public
static
int
Uniform
(
int
a
,
int
b
)
Parameters
a
Type:
System
Int32
a the left endpoint
b
Type:
System
Int32
b the right endpoint
Return Value
Type:
Int32
a random integer uniformly in [a, b)
Exceptions
Exception
Condition
ArgumentException
if
b <= a
ArgumentException
if
b - a >= Integer.MAX_VALUE
See Also
Reference
StdRandom Class
Uniform Overload
Algs4Net Namespace