UNPKG

@thi.ng/tensors

Version:

0D/1D/2D/3D/4D tensors with extensible polymorphic operations and customizable storage

15 lines 774 B
import type { ITensor, TensorData, TensorOpRTT } from "./api.js"; /** * Higher order tensor reduction op factory. Takes given reduction `rfn` and * `init` function to produce an initial result and optional `complete` to * produce the final result. Returns a {@link TensorOpRTT} applying the given * function componentwise, by default with broadcasting rules (see * {@link broadcast} for details). * * @param rfn * @param init * @param complete * @param useBroadcast */ export declare const defOpRTT: <A = number, B = A>(rfn: (acc: B, adata: TensorData<A>, bdata: TensorData<A>, ia: number, ib: number) => B, init: () => B, complete?: (acc: B, a: ITensor<A>, b: ITensor<A>) => B, useBroadcast?: boolean) => TensorOpRTT<A, B>; //# sourceMappingURL=defoprtt.d.ts.map