DiscreteInterval Structure

Represents an interval on the integers.

Definition

Namespace: Meta.Numerics
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public readonly struct DiscreteInterval : IEquatable<DiscreteInterval>
Inheritance
Object    ValueType    DiscreteInterval
Implements
IEquatableDiscreteInterval

Properties

LeftEndpoint Gets the minimum value on the interval.
RightEndpoint Gets the maximum value on the interval.
Width Gets the width of the interval.

Methods

Equals(DiscreteInterval) Tests wither the current instance is equal to another discrete interval.
Equals(Object) Tests whether a given object is equal to the current interval.
(Overrides ValueTypeEquals(Object))
FromEndpoints Instantiates a new discrete interval from the given endpoints.
GetHashCodeReturns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
ToStringReturns the fully qualified type name of this instance.
(Overrides ValueTypeToString)

Operators

Equality(DiscreteInterval, DiscreteInterval) Tests whether two discrete intervals are equal.
Inequality(DiscreteInterval, DiscreteInterval) Tests whether two intervals are not equal.

Fields

Infinite The infinite discrete interval representing all integers.
Semiinfinite The semi-infinite discrete interval representing all non-negative integers.

See Also