Tensor< T > . Set Value Method
On this page
Namespace: Numerics.NET.Tensors Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
Set Value( T, Tensor< Boolean> )
Sets all elements of the tensor to the specified value.
Set Value( T, Index)
Sets the value at the specified index in a 1D tensor.
Set Value( T, Index[] )
Sets the element at the specified position to the specified value.
Set Value( T, Int32)
Sets the value at the specified index in a 1D tensor.
Set Value( T, Int32[] )
Sets the element at the specified position to the specified value.
Set Value( T, Read Only Span< Index> )
Sets the element at the specified position to the specified value.
Set Value( T, Read Only Span< Int32> )
Sets the element at the specified position to the specified value.
Set Value( T, Index, Index)
Sets the value at the specified position in a 2D tensor.
Set Value( T, Int32, Int32)
Sets the value at the specified position in a 2D tensor.
Set Value( T, Index, Index, Index)
Sets the value at the specified position in a 3D tensor.
Set Value( T, Int32, Int32, Int32)
Sets the value at the specified position in a 3D tensor.
Set Value( T, Index, Index, Index, Index)
Sets the value at the specified position in a 4D tensor.
Set Value( T, Int32, Int32, Int32, Int32)
Sets the value at the specified position in a 4D tensor.
Sets all elements of the tensor to the specified value.
public Tensor <T> SetValue (
T value ,
Tensor <bool >? mask = null
)
Public Function SetValue (
value As T,
Optional mask As Tensor (Of Boolean ) = Nothing
) As Tensor (Of T)
public :
Tensor <T>^ SetValue (
T value ,
Tensor <bool >^ mask = nullptr
)
member SetValue :
value : 'T *
?mask : Tensor <bool >
(* Defaults:
let _ mask = defaultArg mask null
*)
-> Tensor <'T>
value T The new value for the elements of the tensor. mask Tensor < Boolean > (Optional)Optional. A boolean tensor that specifies whether
the value at the location should be set to value .
If omitted, all elements of the tensor are set. Tensor < T > This tensor with the selected elements replaced with
value .
Sets the value at the specified index in a 1D tensor.
public virtual void SetValue (
T value ,
Index index
)
Public Overridable Sub SetValue (
value As T,
index As Index
)
public :
virtual void SetValue (
T value ,
Index index
)
abstract SetValue :
value : 'T *
index : Index -> unit
override SetValue :
value : 'T *
index : Index -> unit
Parameters value T The new value for the element. index Index The position of the element.
Sets the element at the specified position to the specified value.
public void SetValue (
T value ,
params Index [] indexes
)
Public Sub SetValue (
value As T,
ParamArray indexes As Index ()
)
public :
void SetValue (
T value ,
... array <Index >^ indexes
)
member SetValue :
value : 'T *
indexes : Index [] -> unit
value T The new value of the element. indexes Index [] The zero-based index of the element. The element in the
indexes th position.
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.
Sets the value at the specified index in a 1D tensor.
public virtual void SetValue (
T value ,
int index
)
Public Overridable Sub SetValue (
value As T,
index As Integer
)
public :
virtual void SetValue (
T value ,
int index
)
abstract SetValue :
value : 'T *
index : int -> unit
override SetValue :
value : 'T *
index : int -> unit
Parameters value T The new value for the element. index Int32 The position of the element.
Sets the element at the specified position to the specified value.
public void SetValue (
T value ,
params int [] indexes
)
Public Sub SetValue (
value As T,
ParamArray indexes As Integer ()
)
public :
void SetValue (
T value ,
... array <int >^ indexes
)
member SetValue :
value : 'T *
indexes : int [] -> unit
value T The new value of the element. indexes Int32 [] The zero-based index of the element. The element in the
indexes th position.
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.
Sets the element at the specified position to the specified value.
public virtual void SetValue (
T value ,
ReadOnlySpan <Index > indexes
)
Public Overridable Sub SetValue (
value As T,
indexes As ReadOnlySpan (Of Index )
)
public :
virtual void SetValue (
T value ,
ReadOnlySpan <Index > indexes
)
abstract SetValue :
value : 'T *
indexes : ReadOnlySpan <Index > -> unit
override SetValue :
value : 'T *
indexes : ReadOnlySpan <Index > -> unit
value T The new value of the element. indexes ReadOnlySpan < Index > The zero-based index of the element. The element in the
indexes th position.
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.
Sets the element at the specified position to the specified value.
public abstract void SetValue (
T value ,
ReadOnlySpan <int > indexes
)
Public MustOverride Sub SetValue (
value As T,
indexes As ReadOnlySpan (Of Integer )
)
public :
virtual void SetValue (
T value ,
ReadOnlySpan <int > indexes
) abstract
abstract SetValue :
value : 'T *
indexes : ReadOnlySpan <int > -> unit
value T The new value of the element. indexes ReadOnlySpan < Int32 > The zero-based index of the element. The element in the
indexes th position.
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.
Sets the value at the specified position in a 2D tensor.
public virtual void SetValue (
T value ,
Index index1 ,
Index index2
)
Public Overridable Sub SetValue (
value As T,
index1 As Index ,
index2 As Index
)
public :
virtual void SetValue (
T value ,
Index index1 ,
Index index2
)
abstract SetValue :
value : 'T *
index1 : Index *
index2 : Index -> unit
override SetValue :
value : 'T *
index1 : Index *
index2 : Index -> unit
Parameters value T The new value for the element. index1 Index The position of the element in the first dimension. index2 Index The position of the element in the second dimension.
Sets the value at the specified position in a 2D tensor.
public virtual void SetValue (
T value ,
int index1 ,
int index2
)
Public Overridable Sub SetValue (
value As T,
index1 As Integer ,
index2 As Integer
)
public :
virtual void SetValue (
T value ,
int index1 ,
int index2
)
abstract SetValue :
value : 'T *
index1 : int *
index2 : int -> unit
override SetValue :
value : 'T *
index1 : int *
index2 : int -> unit
Parameters value T The new value for the element. index1 Int32 The position of the element in the first dimension. index2 Int32 The position of the element in the second dimension.
Sets the value at the specified position in a 3D tensor.
public virtual void SetValue (
T value ,
Index index1 ,
Index index2 ,
Index index3
)
Public Overridable Sub SetValue (
value As T,
index1 As Index ,
index2 As Index ,
index3 As Index
)
public :
virtual void SetValue (
T value ,
Index index1 ,
Index index2 ,
Index index3
)
abstract SetValue :
value : 'T *
index1 : Index *
index2 : Index *
index3 : Index -> unit
override SetValue :
value : 'T *
index1 : Index *
index2 : Index *
index3 : Index -> unit
Parameters value T The new value for the element. 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 second dimension.
Sets the value at the specified position in a 3D tensor.
public virtual void SetValue (
T value ,
int index1 ,
int index2 ,
int index3
)
Public Overridable Sub SetValue (
value As T,
index1 As Integer ,
index2 As Integer ,
index3 As Integer
)
public :
virtual void SetValue (
T value ,
int index1 ,
int index2 ,
int index3
)
abstract SetValue :
value : 'T *
index1 : int *
index2 : int *
index3 : int -> unit
override SetValue :
value : 'T *
index1 : int *
index2 : int *
index3 : int -> unit
Parameters value T The new value for the element. 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 second dimension.
Sets the value at the specified position in a 4D tensor.
public virtual void SetValue (
T value ,
Index index1 ,
Index index2 ,
Index index3 ,
Index index4
)
Public Overridable Sub SetValue (
value As T,
index1 As Index ,
index2 As Index ,
index3 As Index ,
index4 As Index
)
public :
virtual void SetValue (
T value ,
Index index1 ,
Index index2 ,
Index index3 ,
Index index4
)
abstract SetValue :
value : 'T *
index1 : Index *
index2 : Index *
index3 : Index *
index4 : Index -> unit
override SetValue :
value : 'T *
index1 : Index *
index2 : Index *
index3 : Index *
index4 : Index -> unit
Parameters value T The new value for the element. 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 second dimension. index4 Index The position of the element in the second dimension.
Sets the value at the specified position in a 4D tensor.
public virtual void SetValue (
T value ,
int index1 ,
int index2 ,
int index3 ,
int index4
)
Public Overridable Sub SetValue (
value As T,
index1 As Integer ,
index2 As Integer ,
index3 As Integer ,
index4 As Integer
)
public :
virtual void SetValue (
T value ,
int index1 ,
int index2 ,
int index3 ,
int index4
)
abstract SetValue :
value : 'T *
index1 : int *
index2 : int *
index3 : int *
index4 : int -> unit
override SetValue :
value : 'T *
index1 : int *
index2 : int *
index3 : int *
index4 : int -> unit
Parameters value T The new value for the element. 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 second dimension. index4 Int32 The position of the element in the second dimension.