Matrix<T>.GetValue Method

Definition

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

Overload List

GetValue(Int32, Int32) Gets the matrix element at the specified position.
GetValue<R, C>(R, C) Gets the value at the specified row and column keys.
Preliminary

GetValue<R, C>(R, C)

This API is preliminary and subject to change.
Gets the value at the specified row and column keys.
C#
public T GetValue<R, C>(
	R rowKey,
	C columnKey
)

Parameters

rowKey  R
The row key.
columnKey  C
The column key.

Type Parameters

R
The element type of the row index.
C
The element type of the column index.

Return Value

T
The value of the element at row rowKey and column columnKey, or missing if either key could not be found.

Exceptions

InvalidOperationException

The vector is not indexed.

InvalidCastException

The type R does not match the element type of the row index.

-or-

The type C does not match the element type of the column index.

GetValue(Int32, Int32)

Gets the matrix element at the specified position.
C#
public abstract T GetValue(
	int row,
	int column
)

Parameters

row  Int32
The zero-based row index of the element to get or set.
column  Int32
The zero-based column index of the element to get or set.

Return Value

T
The element of the Matrix<T> in the columnth column of the rowth row.

Remarks

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

See Also