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(
Slice slice,
Intent intent
)
Public Function GetSlice (
slice As Slice,
intent As Intent
) As Vector(Of T)
public:
Vector<T>^ GetSlice(
Slice slice,
Intent intent
)
member GetSlice :
slice : Slice *
intent : Intent -> Vector<'T>
Parameters
- slice
- Type: Extreme.MathematicsSlice
A Slice structure that specifies the
elements to return. - 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 | The start index of slice is less than zero
or greater than the length of the vector. -or- One or more indexes in the slice are outside the range of the vector
indexes. |
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