ILNumerics Ultimate VSILMathfind Method (BaseArrayBoolean, Int64, Boolean, OutArrayInt64)ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Find sequential indices of true elements in n-d array, searches from start to end in column major order.

[ILNumerics Computing Engine]

Namespace: ILNumerics
Assembly: ILNumerics.Computing (in ILNumerics.Computing.dll) Version: 5.3.0.0 (5.3.7131.2749)
Syntax

public static RetArray<long> find(
	BaseArray<bool> A,
	long n = 0,
	bool backwards = false,
	OutArray<long> C = null
)

Parameters

A
Type: ILNumericsBaseArrayBoolean
Source array.
n (Optional)
Type: SystemInt64
[Optional] Maximum number of true elements to find. Default: (0) find all true elements.
backwards (Optional)
Type: SystemBoolean
[Optional] Search direction backwards. Default: (false) start at the first element and search to the last element of A.
C (Optional)
Type: ILNumericsOutArrayInt64
[Optional] If non-null on entry: the function returns the row indices and gives column indices in C. Default: (null) the function returns the sequential indices of elements found only.

Return Value

Type: RetArrayInt64
Sequential, column major ordered indices of the true-valued elements in A or row indices if C is not null.
Remarks

If C is not null on entry it contains the column indices of true values when the function returns. If A has more than two dimensions subsequent dimensions are merged into the second dimension and the indices given in C are considered sequential indices.

Note, that the array returned by find(BaseArrayDouble, Int64, Boolean, OutArrayInt64, OutArrayDouble) corresponds to the indices of the rows of true values if C is not null and to sequential indices of those true values if C is null.

Negative values of n are considered as abs(n).

If backwards is true find(BaseArrayDouble, Int64, Boolean, OutArrayInt64, OutArrayDouble) starts searching for true values from the last element and proceeds in column major order to the first element or until ntrue elements were found, if more than ntrue elements are contained in A.

[ILNumerics Computing Engine]

See Also

Reference