Returns a vector whose components are a subset of the components of this instance

Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetSubvector ( _
	startIndex As Integer, _
	endIndex As Integer, _
	stride As Integer, _
	intent As Intent _
) As Vector
C#
public override Vector GetSubvector (
	int startIndex,
	int endIndex,
	int stride,
	Intent intent
)
C++
public:
virtual Vector^ GetSubvector (
	int startIndex, 
	int endIndex, 
	int stride, 
	Intent intent
) override

Parameters

startIndex (System.Int32)
The index of the first element of this Vector to be contained in the new vector.
endIndex (System.Int32)
The index of the last element of this Vector to be contained in the new vector.
stride (System.Int32)
The increment for the index in this instance corresponding to an increment of one in the new vector.
intent (Extreme.Mathematics.Intent)
A Intent value that specifies the intended use of the subvector.

Return Value

A reference to the new Vector.

Remarks

The intent parameter can be used to choose the optimal representation of the subvector for a specific purpose. Note that this method guararantees that the returned vector will be suitable for the specifierd purpose, but it will not enforce it. For example, if the purpose of the subvector is ReadOnly, there is no guarantee that the returned vector will be read-only.

Exceptions

ExceptionCondition
ArgumentOutOfRangeException Either offset is outside the bounds for this instance, or the length is so large that the new Vector would not be entirely contained in the current vector.