Returns a vector whose elements are a subset of the elements of
this instance.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public Vector<T> GetSlice(
int startIndex,
int endIndex,
int stride,
Intent intent
)
Public Function GetSlice (
startIndex As Integer,
endIndex As Integer,
stride As Integer,
intent As Intent
) As Vector(Of T)
public:
Vector<T>^ GetSlice(
int startIndex,
int endIndex,
int stride,
Intent intent
)
member GetSlice :
startIndex : int *
endIndex : int *
stride : int *
intent : Intent -> Vector<'T>
Parameters
- startIndex
- Type: SystemInt32
The index of the first element of this
VectorT to be contained in the new
vector. - endIndex
- Type: SystemInt32
The index of the last element of this
VectorT to be contained in the new
vector. - stride
- Type: SystemInt32
The increment for the index
in this VectorT corresponding to an
increment of one in the new vector. - intent
- Type: Extreme.MathematicsIntent
An Intent value that
specifies the intended use of the sub-vector.
Return Value
Type:
VectorTA reference to the new
VectorT.
Exception | Condition |
---|
ArgumentOutOfRangeException | startIndex is less than zero or greater than the length
of the vector. -or- endIndex is less than zero or greater than the length
of the vector. |
The intent parameter can be used to choose the optimal representation
of the sub-vector for a specific purpose. Note that this method guararantees that the returned
vector will be suitable for the specified purpose, but it will not enforce it. For example,
if the purpose of the sub-vector is ReadOnly, there is no guarantee that
the returned vector will be read-only.
Reference