Vector<T>.GetValue Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3

Overload List

GetValue(Int32) Gets the vector element at the specified position.
GetValue<K>(K) Gets the value at the specified key.
Preliminary

GetValue<K>(K)

This API is preliminary and subject to change.
Gets the value at the specified key.
C#
public T GetValue<K>(
	K key
)

Parameters

key  K
The key value.

Type Parameters

K
The type of the key.

Return Value

T
The value of the element with key key, or missing if the key could not be found.

Exceptions

InvalidOperationException

The vector is not indexed.

InvalidCastException

The type K does not match the element type of the index.

GetValue(Int32)

Gets the vector element at the specified position.
C#
public abstract T GetValue(
	int index
)

Parameters

index  Int32
The zero-based index of the element.

Return Value

T
The element of the Vector<T> in the indexth position.

Remarks

This method does not perform bounds checking. It is provided for optimized access in situations where the argument is known to be within bounds. If the argument is outside its valid range, the result is unspecified.

See Also