Class Range<T>
[BsonIgnoreExtraElements]
public class Range<T> : IEquatable<Range<T>>
Type Parameters
TAny Type
- Inheritance
-
Range<T>
- Implements
-
IEquatable<Range<T>>
- Inherited Members
- Extension Methods
Constructors
Range()
Initializes a new instance of the Range class.
public Range()
Range(T, T)
Initializes a new instance of the Range class with specified minimum and maximum values.
public Range(T min, T max)
Parameters
minTThe minimum value
maxTThe maximum value
Fields
max
Max.
[BsonIgnore]
public T max
Field Value
- T
min
Min.
[BsonIgnore]
public T min
Field Value
- T
Properties
Max
Property form of max.
[BsonElement]
public T Max { get; set; }
Property Value
- T
Min
Property form of min.
[BsonElement]
public T Min { get; set; }
Property Value
- T
ReversePole
Gets a range with reversed poles (positive infinity to negative infinity).
public static Range<double> ReversePole { get; }
Property Value
Methods
AtIter(int)
Get element by iteration index.
public T AtIter(int iter)
Parameters
iterintiteration index
Returns
- T
ref element
AtIterRef(int)
Get element by iteration index.
public ref T AtIterRef(int iter)
Parameters
iterintiteration index
Returns
- T
ref element
Equals(Range<T>)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Range<T> other)
Parameters
otherRange<T>An object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Expand(Range<double>, double)
Expands the range to include the specified value if necessary.
public static void Expand(Range<double> range, double v)
Parameters
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.