Tensor<T>.SetValueAt Method

Sets the element at the specified linear position to the specified value.

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
C#
public abstract void SetValueAt(
	T value,
	int linearIndex
)

Parameters

value  T
The new value of the element.
linearIndex  Int32
The zero-based index of the element.

Return Value

The element in the linearIndexth 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 may be unpredictable or an exception may be thrown.

This method takes a linearized index, from 0 to the number of elements in the tensor.

See Also