SequenceRandom class final

重放确定性小数序列;例如 SequenceRandom([0.1, 0.7])。

Implemented types

Constructors

SequenceRandom(List<double> values)
创建序列;每个值必须在 [0, 1) 内,耗尽抛出 StateError。

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

nextBool() → bool
消耗一个小数,小于一半时返回 true。
override
nextDouble() → double
返回下一个小数,耗尽时抛错。
override
nextInt(int max) → int
消耗一个小数,返回 [0, max) 的整数;max 必须为正。
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited