Vector<T>.Get Slice(Int 32, Int 32, Int 32, Intent) Method
Returns a vector whose elements are a subset of the elements of
this instance.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
A reference to the new Vector<T>.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public Vector<T> GetSlice(
int startIndex,
int endIndex,
int stride,
Intent intent
)
Parameters
- startIndex Int32
- The index of the first element of this Vector<T> to be contained in the new vector.
- endIndex Int32
- The index of the last element of this Vector<T> to be contained in the new vector.
- stride Int32
- The increment for the index in this Vector<T> corresponding to an increment of one in the new vector.
- intent Intent
- An Intent value that specifies the intended use of the sub-vector.
Return Value
Vector<T>A reference to the new Vector<T>.
Remarks
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.
Exceptions
Argument | 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. |