import { PRNG } from "../rng/index.js"; import { MixedSet } from "../utility/MixedSet.js"; import * as Result from "../utility/result.js"; import * as XYShape from "../XYShape.js"; import * as Continuous from "./Continuous.js"; import { ContinuousShape } from "./Continuous.js"; import { MixedShape } from "./Mixed.js"; import * as MixedPoint from "./MixedPoint.js"; import { ConvolutionOperation, PointSet } from "./PointSet.js"; export type SerializedDiscreteShape = { xyShape: XYShape.XYShape; integralSumCache?: number; integralCache?: Continuous.SerializedContinuousShape; }; export declare class DiscreteShape implements PointSet { readonly xyShape: XYShape.XYShape; private _integralSumCache?; private _integralCache?; constructor(args: { xyShape: XYShape.XYShape; integralSumCache?: number; integralCache?: ContinuousShape; }); get integralCache(): Continuous.ContinuousShape | undefined; get integralSumCache(): number | undefined; withAdjustedIntegralSum(integralSumCache: number): DiscreteShape; shapeMap(fn: (shape: XYShape.XYShape) => XYShape.XYShape): DiscreteShape; integral(): Continuous.ContinuousShape; integralSum(): number; integralXtoY(f: number): number; integralYtoX(f: number): number; minX(): number; maxX(): number; toDiscreteProbabilityMassFraction(): number; isEqual(t: DiscreteShape): boolean; mapY(fn: (y: number) => number, integralSumCacheFn?: ((sum: number) => number | undefined) | undefined, integralCacheFn?: ((cache: Continuous.ContinuousShape) => Continuous.ContinuousShape | undefined) | undefined): DiscreteShape; mapYResult(fn: (y: number) => Result.result, integralSumCacheFn: ((sum: number) => number | undefined) | undefined, integralCacheFn: ((cache: ContinuousShape) => ContinuousShape | undefined) | undefined): Result.result; isEmpty(): boolean; toContinuous(): undefined; toDiscrete(): this; toMixed(): MixedShape; scaleBy(scale: number): DiscreteShape; normalize(): DiscreteShape; downsample(i: number): DiscreteShape; truncate(leftCutoff: number | undefined, rightCutoff: number | undefined): DiscreteShape; xToY(f: number): MixedPoint.MixedPoint; mean(): number; variance(): number; yTransform(): MixedShape; support(): MixedSet; serialize(): SerializedDiscreteShape; static deserialize(s: SerializedDiscreteShape): DiscreteShape; } export declare const empty: () => DiscreteShape; export declare function combinePointwise(t1: DiscreteShape, t2: DiscreteShape, fn: (v1: number, v2: number) => Result.result): Result.result; export declare const combineAlgebraically: (op: ConvolutionOperation, t1: DiscreteShape, t2: DiscreteShape) => DiscreteShape; export declare const sampleN: (t: DiscreteShape, n: number, rng: PRNG) => number[]; //# sourceMappingURL=Discrete.d.ts.map