Sets the the specified starting index, specified ending index and the stride
for this Range.
Namespace:
CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public override void Set( int start, int end, int stride ) |
| Visual Basic (Declaration) |
|---|
Public Overrides Sub Set ( _ start As Integer, _ end As Integer, _ stride As Integer _ ) |
| Visual C++ |
|---|
public: virtual void Set( int start, int end, int stride ) override |
Parameters
- start
- Type: System..::.Int32
The first data element.
- end
- Type: System..::.Int32
The last data element.
- stride
- Type: System..::.Int32
The step increment between successive data elements.
Remarks
To indicate an ending index equal to the maximum legal index in the underlying
data, use Set(int, Position, int).
Examples
For example, in a vector of 10 elements, calling Set(0,6,2)
on a Range could be used to view or manipulate the elements { 0 3 5 }.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if the start is negative, the end is negative, the stride is zero, the start is greater than the end when the stride is positive, or the start is less than the end when the stride is negative. |