time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

operation.d.ts (1225B)


      1 import { result } from "./utility/result.js";
      2 import { OperationError } from "./operationError.js";
      3 export type AlgebraicOperation = "Add" | "Multiply" | "Subtract" | "Divide" | "Power" | "Logarithm" | {
      4     NAME: "LogarithmWithThreshold";
      5     VAL: number;
      6 };
      7 export type ConvolutionOperation = "Add" | "Multiply" | "Subtract";
      8 export declare const Convolution: {
      9     fromAlgebraicOperation(op: AlgebraicOperation): ConvolutionOperation | undefined;
     10     canDoAlgebraicOperation(op: AlgebraicOperation): boolean;
     11     toFn(t: ConvolutionOperation): (a: number, b: number) => number;
     12 };
     13 type OperationFn = (a: number, b: number) => result<number, OperationError>;
     14 export declare const Algebraic: {
     15     toFn(x: AlgebraicOperation): OperationFn;
     16     toString(x: AlgebraicOperation): "+" | "-" | "*" | "/" | "log" | "**";
     17 };
     18 export type ScaleOperation = "Multiply" | "Power" | "Logarithm" | {
     19     NAME: "LogarithmWithThreshold";
     20     VAL: number;
     21 } | "Divide";
     22 export declare const Scale: {
     23     toFn(x: ScaleOperation): OperationFn;
     24     toIntegralSumCacheFn(x: ScaleOperation): ((a: number, b: number) => number) | undefined;
     25     toIntegralCacheFn(x: ScaleOperation): undefined;
     26 };
     27 export {};
     28 //# sourceMappingURL=operation.d.ts.map