time-to-botec

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

SqPlot.d.ts (3320B)


      1 import { Env } from "../../dist/env.js";
      2 import * as Result from "../../utility/result.js";
      3 import { Plot } from "../../value/index.js";
      4 import { SqError } from "../SqError.js";
      5 import { SqValueContext } from "../SqValueContext.js";
      6 import { SqDistribution, SqSampleSetDistribution } from "./SqDistribution/index.js";
      7 import { SqLambda } from "./SqLambda.js";
      8 import { SqScale } from "./SqScale.js";
      9 import { SqPlotValue } from "./index.js";
     10 type LabeledSqDistribution = {
     11     name?: string;
     12     distribution: SqDistribution;
     13 };
     14 export declare function wrapPlot(value: Plot, context?: SqValueContext): SqPlot;
     15 declare abstract class SqAbstractPlot<T extends Plot["type"]> {
     16     protected _value: Extract<Plot, {
     17         type: T;
     18     }>;
     19     context?: SqValueContext | undefined;
     20     abstract tag: T;
     21     constructor(_value: Extract<Plot, {
     22         type: T;
     23     }>, context?: SqValueContext | undefined);
     24     toString(): string;
     25     get asValue(): SqPlotValue;
     26     get title(): string | undefined;
     27 }
     28 export declare class SqDistributionsPlot extends SqAbstractPlot<"distributions"> {
     29     tag: "distributions";
     30     static create({ distribution, xScale, yScale, showSummary, title, }: {
     31         distribution: SqDistribution;
     32         xScale: SqScale;
     33         yScale: SqScale;
     34         showSummary: boolean;
     35         title?: string;
     36     }): SqDistributionsPlot;
     37     get distributions(): LabeledSqDistribution[];
     38     get showSummary(): boolean;
     39     get xScale(): SqScale;
     40     get yScale(): SqScale;
     41 }
     42 export declare class SqNumericFnPlot extends SqAbstractPlot<"numericFn"> {
     43     tag: "numericFn";
     44     private createdProgrammatically;
     45     static create({ fn, xScale, yScale, points, title, }: {
     46         fn: SqLambda;
     47         xScale: SqScale;
     48         yScale: SqScale;
     49         points?: number;
     50         title?: string;
     51     }): SqNumericFnPlot;
     52     get fn(): SqLambda;
     53     get xScale(): SqScale;
     54     get yScale(): SqScale;
     55     get points(): number | undefined;
     56     toString(): string;
     57 }
     58 export declare class SqDistFnPlot extends SqAbstractPlot<"distFn"> {
     59     tag: "distFn";
     60     private createdProgrammatically;
     61     static create({ fn, xScale, yScale, distXScale, title, points, }: {
     62         fn: SqLambda;
     63         xScale: SqScale;
     64         yScale: SqScale;
     65         distXScale: SqScale;
     66         title?: string;
     67         points?: number;
     68     }): SqDistFnPlot;
     69     get fn(): SqLambda;
     70     get xScale(): SqScale;
     71     get yScale(): SqScale;
     72     get distXScale(): SqScale;
     73     get points(): number | undefined;
     74     toString(): string;
     75 }
     76 export declare class SqScatterPlot extends SqAbstractPlot<"scatter"> {
     77     tag: "scatter";
     78     private buildSampleSetDist;
     79     xDist(env: Env): Result.result<SqSampleSetDistribution, SqError>;
     80     yDist(env: Env): Result.result<SqSampleSetDistribution, SqError>;
     81     get xScale(): SqScale | undefined;
     82     get yScale(): SqScale | undefined;
     83     static zipToPoints(xDist: SqSampleSetDistribution, yDist: SqSampleSetDistribution): {
     84         x: number;
     85         y: number;
     86     }[];
     87 }
     88 export declare class SqRelativeValuesPlot extends SqAbstractPlot<"relativeValues"> {
     89     tag: "relativeValues";
     90     get ids(): string[];
     91     get fn(): SqLambda;
     92 }
     93 export type SqPlot = SqDistributionsPlot | SqNumericFnPlot | SqDistFnPlot | SqScatterPlot | SqRelativeValuesPlot;
     94 export {};
     95 //# sourceMappingURL=SqPlot.d.ts.map