@thi.ng/tensors
Version:
0D/1D/2D/3D/4D tensors with extensible polymorphic operations and customizable storage
34 lines • 1.23 kB
TypeScript
import type { Predicate } from "@thi.ng/api";
/**
* Higher order function. Takes a predicate function and returns a new function
* which accepts a tensor and then returns an array of tensor component indices
* for which the predicate passed.
*
* @remarks
* Also see {@link nonZeroIndices}.
*
* @param pred
*/
export declare const filteredIndices: <T = number>(pred: Predicate<T>) => import("./api.js").MultiTensorOpImpl<import("./api.js").TensorOpRT<T, number[]>>;
/**
* Returns an array of indices where the given tensor has non-zero component
* values.
*
* @param a
*/
export declare const nonZeroIndices: import("./api.js").MultiTensorOpImpl<import("./api.js").TensorOpRT<number, number[]>>;
/**
* Returns an array of indices where the given tensor has negative component
* values.
*
* @param a
*/
export declare const negativeIndices: import("./api.js").MultiTensorOpImpl<import("./api.js").TensorOpRT<number, number[]>>;
/**
* Returns an array of indices where the given tensor has positive component
* values.
*
* @param a
*/
export declare const positiveIndices: import("./api.js").MultiTensorOpImpl<import("./api.js").TensorOpRT<number, number[]>>;
//# sourceMappingURL=filtered-indices.d.ts.map