Tensor.FilteredUpdate Method

Definition

Overloads

FilteredUpdate<T>(TensorSpan<T>, ReadOnlyTensorSpan<Boolean>, T)

Updates the tensor tensor with the value where the filter is true.

FilteredUpdate<T>(TensorSpan<T>, ReadOnlyTensorSpan<Boolean>, ReadOnlyTensorSpan<T>)

Updates the tensor tensor with the values where the filter is true. If dimensions are not the same an exception is thrown.

FilteredUpdate<T>(TensorSpan<T>, ReadOnlyTensorSpan<Boolean>, T)

Source:
TensorExtensions.cs

Updates the tensor tensor with the value where the filter is true.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Tensors::TensorSpan<T> ^ FilteredUpdate(System::Numerics::Tensors::TensorSpan<T> % tensor, System::Numerics::Tensors::ReadOnlyTensorSpan<bool> % filter, T value);
public static ref readonly System.Numerics.Tensors.TensorSpan<T> FilteredUpdate<T> (this in System.Numerics.Tensors.TensorSpan<T> tensor, scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<bool> filter, T value);
static member FilteredUpdate : TensorSpan * ReadOnlyTensorSpan * 'T -> TensorSpan
<Extension()>
Public Function FilteredUpdate(Of T) (ByRef tensor As TensorSpan(Of T), ByRef filter As ReadOnlyTensorSpan(Of Boolean), value As T) As TensorSpan(Of T)

Type Parameters

T

Parameters

tensor
TensorSpan<T>

Input Tensor<T>.

filter
ReadOnlyTensorSpan<Boolean>

Input filter where if the index is true then it will update the tensor.

value
T

Value to update in the tensor.

Returns

Applies to

FilteredUpdate<T>(TensorSpan<T>, ReadOnlyTensorSpan<Boolean>, ReadOnlyTensorSpan<T>)

Source:
TensorExtensions.cs

Updates the tensor tensor with the values where the filter is true. If dimensions are not the same an exception is thrown.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Tensors::TensorSpan<T> ^ FilteredUpdate(System::Numerics::Tensors::TensorSpan<T> % tensor, System::Numerics::Tensors::ReadOnlyTensorSpan<bool> % filter, System::Numerics::Tensors::ReadOnlyTensorSpan<T> % values);
public static ref readonly System.Numerics.Tensors.TensorSpan<T> FilteredUpdate<T> (this in System.Numerics.Tensors.TensorSpan<T> tensor, scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<bool> filter, scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> values);
static member FilteredUpdate : TensorSpan * ReadOnlyTensorSpan * ReadOnlyTensorSpan -> TensorSpan
<Extension()>
Public Function FilteredUpdate(Of T) (ByRef tensor As TensorSpan(Of T), ByRef filter As ReadOnlyTensorSpan(Of Boolean), ByRef values As ReadOnlyTensorSpan(Of T)) As TensorSpan(Of T)

Type Parameters

T

Parameters

tensor
TensorSpan<T>

Input Tensor<T>.

filter
ReadOnlyTensorSpan<Boolean>

Input filter where if the index is true then it will update the tensor.

values
ReadOnlyTensorSpan<T>

Values to update in the tensor.

Returns

Applies to