Tensor<T>.Find Method

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.0

Overload List

Find() Gets the linearized indexes of the elements of the tensor that are not zero.
Find(Func<T, Boolean>) Gets the linearized indexes where the elements of the tensor satisfy the specified predicate.

Find

Gets the linearized indexes of the elements of the tensor that are not zero.
C#
public virtual int[] Find()

Return Value

Int32[]
An integer array that contains the linearized indexes of the elements of this tensor that are not zero.

Find(Func<T, Boolean>)

Gets the linearized indexes where the elements of the tensor satisfy the specified predicate.
C#
public virtual int[] Find(
	Func<T, bool> predicate
)

Parameters

predicate  Func<T, Boolean>
The predicate to apply to the elements of the tensor.

Return Value

Int32[]
An integer array that contains the linearized indexes of the elements of this tensor that satisfy predicate.

Exceptions

ArgumentNullException

predicate is null.

See Also