Tensor<T>.Get Value Method
Definition
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
Overload List
Get | Gets the value at the specified position in a 1D tensor. |
Get | Gets the element at the specified position. |
Get | Gets the value at the specified index in a 1D tensor. |
Get | Gets the element at the specified position. |
Get | Gets the element at the specified position. |
Get | Gets the element at the specified position. |
Get | Gets the value at the specified position in a 2D tensor. |
Get | Gets the value at the specified position in a 2D tensor. |
Get | Gets the value at the specified position in a 3D tensor. |
Get | Gets the value at the specified position in a 2D tensor. |
Get | Gets the value at the specified position in a 4D tensor. |
Get | Gets the value at the specified position in a 4D tensor. |
GetValue(Index)
public virtual T GetValue(
Index index
)
Parameters
- index Index
- The position of the element.
Return Value
TThe element with index index.
GetValue(Index[])
public T GetValue(
params Index[] indexes
)
Parameters
Return Value
TThe element in the position specified by indexes.
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.
Exceptions
Dimension | The length of indexes is not equal to the rank of the tensor. |
GetValue(Int32)
public virtual T GetValue(
int index
)
Parameters
- index Int32
- The position of the element.
Return Value
TThe element at position index.
GetValue(Int32[])
public T GetValue(
params int[] indexes
)
Parameters
- indexes Int32[]
- An array of zero-based indexes of the element.
Return Value
TThe element in the position specified by indexes.
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.
Exceptions
Dimension | The length of indexes is not equal to the rank of the tensor. |
GetValue(ReadOnlySpan<Index>)
public virtual T GetValue(
ReadOnlySpan<Index> indexes
)
Parameters
- indexes ReadOnlySpan<Index>
- A read-only span of Index values of the element.
Return Value
TThe element in the position specified by indexes.
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.
Exceptions
Dimension | The length of indexes is not equal to the rank of the tensor. |
GetValue(ReadOnlySpan<Int32>)
public abstract T GetValue(
ReadOnlySpan<int> indexes
)
Parameters
- indexes ReadOnlySpan<Int32>
- A read-only span of zero-based indexes of the element.
Return Value
TThe element in the position specified by indexes.
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.
Exceptions
Dimension | The length of indexes is not equal to the rank of the tensor. |
GetValue(Index, Index)
public virtual T GetValue(
Index index1,
Index index2
)
Parameters
- index1 Index
- The position of the element in the first dimension.
- index2 Index
- The position of the element in the second dimension.
Return Value
TThe element with indices index1 and index2.
GetValue(Int32, Int32)
public virtual T GetValue(
int index1,
int index2
)
Parameters
- index1 Int32
- The position of the element in the first dimension.
- index2 Int32
- The position of the element in the second dimension.
Return Value
TThe element with indices index1 and index2.
GetValue(Index, Index, Index)
public virtual T GetValue(
Index index1,
Index index2,
Index index3
)
Parameters
- index1 Index
- The position of the element in the first dimension.
- index2 Index
- The position of the element in the second dimension.
- index3 Index
- The position of the element in the third dimension.
Return Value
TThe element with indices index1, index2, and index3.
GetValue(Int32, Int32, Int32)
public virtual T GetValue(
int index1,
int index2,
int index3
)
Parameters
- index1 Int32
- The position of the element in the first dimension.
- index2 Int32
- The position of the element in the second dimension.
- index3 Int32
- The position of the element in the third dimension.
Return Value
TThe element with indices index1, index2, and index3.
GetValue(Index, Index, Index, Index)
public virtual T GetValue(
Index index1,
Index index2,
Index index3,
Index index4
)
Parameters
- index1 Index
- The position of the element in the first dimension.
- index2 Index
- The position of the element in the second dimension.
- index3 Index
- The position of the element in the third dimension.
- index4 Index
- The position of the element in the fourth dimension.
Return Value
TThe element with indices index1, index2, index3, and index4.
GetValue(Int32, Int32, Int32, Int32)
public virtual T GetValue(
int index1,
int index2,
int index3,
int index4
)
Parameters
- index1 Int32
- The position of the element in the first dimension.
- index2 Int32
- The position of the element in the second dimension.
- index3 Int32
- The position of the element in the third dimension.
- index4 Int32
- The position of the element in the fourth dimension.
Return Value
TThe element with indices index1, index2, index3, and index4.