Represents a range of indexes.

Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public Structure Range
C#
public struct Range
C++
public value class Range

Methods

IconTypeDescription
static memberEquality(Range, Range)
Returns a value indicating whether two instances of Range are equal.
Equals(Object)
Determines whether the specified Object is equal to the current Range.
Finalize()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
GetHashCode()
Returns the hash code for this instance.
GetType()
Gets the Type of the current instance.
static memberInequality(Range, Range)
Returns a value indicating whether two instances of Range are different.
MemberwiseClone()
Creates a shallow copy of the current Object.
ToString()
Returns the fully qualified type name of this instance.

Fields

IconTypeDescription
static memberAll
Represents the range over an entire row, column, or vector.

Constructors

IconTypeDescription
RangeNew(Int32, Int32)
Constructs a new Range.
RangeNew(Int32, Int32, Int32)
Constructs a new Range.

Properties

IconTypeDescription
EndIndex
Gets the index of the last element in the range.
StartIndex
Gets the index of the first element in the range.
Stride
Gets the increment for the index.

Remarks

Use a Range structure to represent a range of indexes for a vector or matrix. The range runs from StartIndex to EndIndex with increments of Stride.

StartIndex is guaranteed to be the first index in the range. The last index in the range is the largest number of the form StartIndex + kStride that is less than or equal to EndIndex.

The Stride property can also be negative. In this case, the last index in the range is the smallest number of the form StartIndex + kStride that is greater than or equal to EndIndex.

The special range All can be used to represent a range over an entire row, column, or vector, without having to specify the EndIndex explicitly.

Range objects are immutable. Once created, the start index, end index and stride properties cannot be modified. Instead, create a new Range instance.