Matrix<T>.GetValue Method

Definition

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

Overload List

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

GetValue<R, C>(R, C)

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)

Note: This API is now obsolete.
Gets the matrix element at the specified position.
C#
[ObsoleteAttribute("Use GetValueUnchecked instead. Derived matrix types should override GetValueUnchecked.", 
	false)]
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.

This virtual member remains a compatibility extension point for existing derived matrix types. New derived types should override GetValueUnchecked(Int32, Int32).

See Also