2022-02-27 04:25:30 +00:00
|
|
|
import {runAll} from '../rescript/ProgramEvaluator.gen';
|
2022-03-23 14:30:49 +00:00
|
|
|
import type { Inputs_SamplingInputs_t as SamplingInputs, exportEnv, exportType, exportDistribution} from '../rescript/ProgramEvaluator.gen';
|
|
|
|
export type { SamplingInputs, exportEnv, exportDistribution }
|
2022-02-27 04:25:30 +00:00
|
|
|
export type {t as DistPlus} from '../rescript/pointSetDist/DistPlus.gen';
|
2022-03-01 07:43:35 +00:00
|
|
|
|
|
|
|
export let defaultSamplingInputs : SamplingInputs = {
|
|
|
|
sampleCount : 10000,
|
|
|
|
outputXYPoints : 10000,
|
|
|
|
pointDistLength : 1000
|
|
|
|
}
|
|
|
|
|
2022-03-22 02:33:28 +00:00
|
|
|
export function run(squiggleString : string, samplingInputs? : SamplingInputs, environment?: exportEnv) : { tag: "Ok"; value: exportType }
|
|
|
|
| { tag: "Error"; value: string } {
|
2022-03-01 07:43:35 +00:00
|
|
|
let si : SamplingInputs = samplingInputs ? samplingInputs : defaultSamplingInputs
|
2022-03-22 02:33:28 +00:00
|
|
|
let env : exportEnv = environment ? environment : []
|
|
|
|
return runAll(squiggleString, si, env)
|
2022-03-01 07:43:35 +00:00
|
|
|
}
|