SingularInterval class
A fixed numerical interval where the start point coincides with the end point.
- The method
next()
returns the only point in the interval. - The method
perturb(position, deltaPosition)
returns the only point in the interval if it coincides withposition
.
The class is used for example to specify the radius of a surface of a sphere.
- Inheritance
-
- Object
- Interval
- FixedInterval
- SingularInterval
Constructors
- SingularInterval(num value, {String name = ''})
- Constructs a singular fixed interval.
- SingularInterval.of(SingularInterval 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 coincides withstart
.override -
next(
) → num -
Returns the singular value `start.
override
-
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
andright
overlapsthis
.inherited -
perturb(
num position, num deltaPosition) → num -
Returns
position
ifstart == position
. Returnsdouble.nan
otherwise.override -
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