PeriodicInterval class

An interval that wraps around itself.

Usage: Defining the interval representing the longitudinal angle of spherical coordinates. Any angle may then be remapped to the interval 0...2pi.

Inheritance

Constructors

PeriodicInterval(num start, num end, {InverseCdf? inverseCdf, String name = ''})
PeriodicInterval.of(FixedInterval interval)

Properties

dx → Lazy<num>
Step size between discrete levels.
latefinalinherited
end num
End point of the numerical interval.
finalinherited
gridPoints List<num>
Returns the grid points associated with the discrete interval.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
inverseCdf InverseCdf?
Inverse cummulative distribution function.
finalinherited
isContinuous bool
Returns true if the interval is continuous.
no setterinherited
isDiscrete bool
Returns true if the interval is discrete (has at least 2 gridpoints).
no setterinherited
isUpToDate bool
Returns true is the cached random numbers are up-to-date.
no setterinherited
levels int
Returns the levels of a discrete interval.
getter/setter pairinherited
name String
Returns the name of interval.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size num
Returns the size of the interval.
latefinalinherited
start num
Start point of the numerical interval.
finalinherited

Methods

contains(num position) bool
Returns true if position is safisfying (start <= position && position <= end).
inherited
next() num
Returns the next random number sampled from the interval (start, end).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overlaps(num left, num right) bool
Returns true if the interval defined by the points left and right overlaps this.
override
perturb(num position, num deltaPosition) num
Returns the next random number sampled from the interval obtained by intersecting: (start, end) and (position - deltaPosition, position + deltaPosition).
inherited
toString() String
A string representation of this object.
inherited
updateCache() → void
Marks the internal cache as stale. After calling this function the methods next and perturb will return a new random number sampled from the interval start...end.
inherited

Operators

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