Vector.Create Indexed Method
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Create | Constructs a new indexed vector. |
Create | Constructs a new vector whose elements are at the specified indexes in an array. |
CreateIndexed<T>(T[], Int32[], ArrayMutability)
Constructs a new indexed vector.
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
Argument | values is null. -or- indexes is null. |
Argument | 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.
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
Argument | values is null. -or- indexes is null. |
Argument | length is less than zero. |
Argument | One or more values in the indexes array is not a valid index into values. |