Vector.CreateIndexed Method

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

CreateIndexed<T>(T[], Int32[], ArrayMutability) Constructs a new indexed vector.
CreateIndexed<T>(Int32, T[], Int32[], Int32, Int32, ArrayMutability) Constructs a new vector whose elements are at the specified indexes in an array.

CreateIndexed<T>(T[], Int32[], ArrayMutability)

Constructs a new indexed vector.
C#
public static IndexedVector<T> CreateIndexed<T>(
	T[] values,
	int[] indexes,
	ArrayMutability mutability
)

Parameters

values  T[]
A Double array containing the values for the vector.
indexes  Int32[]
An Int32 array containing the indexes into values of the elements of the vector.
mutability  ArrayMutability
Specifies how the vector's values may be changed. The default is mutable values.

Type Parameters

T

Return Value

IndexedVector<T>

Exceptions

ArgumentNullException

values is null.

-or-

indexes is null.

ArgumentException

One or more values in the indexes array is not a valid index into values.

CreateIndexed<T>(Int32, T[], Int32[], Int32, Int32, ArrayMutability)

Constructs a new vector whose elements are at the specified indexes in an array.
C#
public static IndexedVector<T> CreateIndexed<T>(
	int length,
	T[] values,
	int[] indexes,
	int offset,
	int stride,
	ArrayMutability mutability
)

Parameters

length  Int32
The length of the vector.
values  T[]
An array containing the values for the vector.
indexes  Int32[]
An integer array containing the indexes into values of the elements of the vector.
offset  Int32
Offset into indexes where the index of the first component is stored.
stride  Int32
The increment for the index into indexes.
mutability  ArrayMutability
Specifies how the vector's values may be changed. The default is mutable values.

Type Parameters

T

Return Value

IndexedVector<T>

Exceptions

ArgumentNullException

values is null.

-or-

indexes is null.

ArgumentOutOfRangeException

length is less than zero.

ArgumentException

One or more values in the indexes array is not a valid index into values.

See Also