time-to-botec

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

Discrete.d.ts (2749B)


      1 import * as Continuous from "./Continuous.js";
      2 import * as Result from "../utility/result.js";
      3 import * as MixedPoint from "./MixedPoint.js";
      4 import { ContinuousShape } from "./Continuous.js";
      5 import * as XYShape from "../XYShape.js";
      6 import { ConvolutionOperation, PointSet } from "./PointSet.js";
      7 import { MixedShape } from "./Mixed.js";
      8 export declare class DiscreteShape implements PointSet<DiscreteShape> {
      9     readonly xyShape: XYShape.XYShape;
     10     private _integralSumCache?;
     11     private _integralCache?;
     12     constructor(args: {
     13         xyShape: XYShape.XYShape;
     14         integralSumCache?: number;
     15         integralCache?: ContinuousShape;
     16     });
     17     get integralCache(): Continuous.ContinuousShape | undefined;
     18     get integralSumCache(): number | undefined;
     19     withAdjustedIntegralSum(integralSumCache: number): DiscreteShape;
     20     shapeMap(fn: (shape: XYShape.XYShape) => XYShape.XYShape): DiscreteShape;
     21     integral(): Continuous.ContinuousShape;
     22     integralSum(): number;
     23     integralXtoY(f: number): number;
     24     integralYtoX(f: number): number;
     25     minX(): number;
     26     maxX(): number;
     27     toDiscreteProbabilityMassFraction(): number;
     28     isEqual(t: DiscreteShape): boolean;
     29     mapY(fn: (y: number) => number, integralSumCacheFn?: ((sum: number) => number | undefined) | undefined, integralCacheFn?: ((cache: Continuous.ContinuousShape) => Continuous.ContinuousShape | undefined) | undefined): DiscreteShape;
     30     mapYResult<E>(fn: (y: number) => Result.result<number, E>, integralSumCacheFn: ((sum: number) => number | undefined) | undefined, integralCacheFn: ((cache: ContinuousShape) => ContinuousShape | undefined) | undefined): Result.result<DiscreteShape, E>;
     31     isEmpty(): boolean;
     32     toContinuous(): undefined;
     33     toDiscrete(): this;
     34     toMixed(): MixedShape;
     35     scaleBy(scale: number): DiscreteShape;
     36     normalize(): DiscreteShape;
     37     downsample(i: number): DiscreteShape;
     38     truncate(leftCutoff: number | undefined, rightCutoff: number | undefined): DiscreteShape;
     39     xToY(f: number): MixedPoint.MixedPoint;
     40     mean(): number;
     41     variance(): number;
     42 }
     43 export declare const empty: () => DiscreteShape;
     44 export declare const isFloat: (t: DiscreteShape) => boolean;
     45 export declare const getShape: (t: DiscreteShape) => XYShape.XYShape;
     46 export declare const combinePointwise: <E>(t1: DiscreteShape, t2: DiscreteShape, fn: (v1: number, v2: number) => Result.result<number, E>, integralSumCachesFn?: (v1: number, v2: number) => number | undefined) => Result.result<DiscreteShape, E>;
     47 export declare const combineAlgebraically: (op: ConvolutionOperation, t1: DiscreteShape, t2: DiscreteShape) => DiscreteShape;
     48 export declare const sampleN: (t: DiscreteShape, n: number) => number[];
     49 //# sourceMappingURL=Discrete.d.ts.map