Click or drag to resize

Range Class

Class Range represents a collection of indices that can be used to view a subset of data from another data structure. A Range is defined by a starting index, an ending index or enumerated Position value, and a step increment called the stride.
Inheritance Hierarchy

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.3
Syntax
[SerializableAttribute]
public class Range : Slice

The Range type exposes the following members.

Constructors
  NameDescription
Protected methodRange
Default constructor.
Public methodRange(Int32, Position)
Constructs a Range instance with the specified starting index, total number of elements, and the default stride of 1.
Public methodCode exampleRange(Int32, Int32)
Constructs a Range instance with the given starting index and ending index, using a default stride of 1.
Public methodRange(Position, Position)
Constructs a Range instance with the specified start and end positions.
Public methodRange(Int32, Position, Int32)
Constructs a Range instance with the specified starting index, total number of elements, and stride.
Public methodCode exampleRange(Int32, Int32, Int32)
Constructs a Range instance with the given starting index, ending index, and stride.
Public methodRange(Position, Position, Int32)
Constructs a Range instance with the specified start and end positions and a stride.
Top
Properties
  NameDescription
Public propertyStatic memberAll
Gets a new Range indexing all.
Public propertyEnd
Gets the end data element.
(Inherited from Slice.)
Public propertyNumElements
Gets the total number of data elements.
(Inherited from Slice.)
Public propertyStart
Gets the starting data element.
(Inherited from Slice.)
Public propertyStride
Gets the step increment between successive data elements.
(Inherited from Slice.)
Top
Methods
  NameDescription
Public methodBegin
Calculates the starting element of this slice.
(Inherited from Slice.)
Public methodClone
Creates a deep copy of this range.
(Overrides SliceClone.)
Public methodLength
Calculates the length of this slice.
(Inherited from Slice.)
Public methodCode exampleSet(Int32, Int32, Int32)
Sets the the specified starting index, specified ending index and the stride for this Range.
(Overrides SliceSet(Int32, Int32, Int32).)
Public methodSet(Int32, Position, Int32)
Sets the specified starting index, a Position value indicating the end of the data, and a specified stride.
(Inherited from Slice.)
Public methodSet(Position, Position, Int32)
Sets the specified start and end positions and a stride.
(Inherited from Slice.)
Public methodSet(Position, Int32, Int32)
Sets the specified position from which to start, the end index and a stride.
(Inherited from Slice.)
Top
Fields
  NameDescription
Protected fieldend_
The end of the data.
(Inherited from Slice.)
Protected fieldnumElements_
The total number of data elements.
(Inherited from Slice.)
Protected fieldstart_
The start of the data.
(Inherited from Slice.)
Protected fieldstride_
The step increment between successive elements in the data.
(Inherited from Slice.)
Top
See Also