Table of Contents

Class Range<T>

Namespace
Hi.Common
Assembly
HiGeom.dll

Range from Min to Max.

[BsonIgnoreExtraElements]
public class Range<T> : IEquatable<Range<T>>

Type Parameters

T

Any Type

Inheritance
Range<T>
Implements
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

min T

The minimum value

max T

The 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

Range<double>

Methods

AtIter(int)

Get element by iteration index.

public T AtIter(int iter)

Parameters

iter int

iteration index

Returns

T

ref element

AtIterRef(int)

Get element by iteration index.

public ref T AtIterRef(int iter)

Parameters

iter int

iteration 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

other Range<T>

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Expand(Range<double>, double)

Expands the range to include the specified value if necessary.

public static void Expand(Range<double> range, double v)

Parameters

range Range<double>

The range to expand

v double

The value to include in the range

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.