@genType type env = { sampleCount: int, xyPointLength: int, } @genType let defaultEnv: env open DistributionTypes @genType type outputType = | Dist(genericDist) | Float(float) | String(string) | FloatArray(array) | Bool(bool) | GenDistError(error) @genType let run: (~env: env, DistributionTypes.DistributionOperation.genericFunctionCallInfo) => outputType let runFromDist: ( ~env: env, ~functionCallInfo: DistributionTypes.DistributionOperation.fromDist, genericDist, ) => outputType let runFromFloat: ( ~env: env, ~functionCallInfo: DistributionTypes.DistributionOperation.fromFloat, float, ) => outputType module Output: { type t = outputType let toDist: t => option let toDistR: t => result let toFloat: t => option let toFloatR: t => result let toString: t => option let toStringR: t => result let toBool: t => option let toBoolR: t => result let toError: t => option let fmap: (~env: env, t, DistributionTypes.DistributionOperation.singleParamaterFunction) => t } module Constructors: { @genType let mean: (~env: env, genericDist) => result @genType let stdev: (~env: env, genericDist) => result @genType let variance: (~env: env, genericDist) => result @genType let sample: (~env: env, genericDist) => result @genType let cdf: (~env: env, genericDist, float) => result @genType let inv: (~env: env, genericDist, float) => result @genType let pdf: (~env: env, genericDist, float) => result @genType let normalize: (~env: env, genericDist) => result @genType let isNormalized: (~env: env, genericDist) => result module LogScore: { @genType let distEstimateDistAnswer: (~env: env, genericDist, genericDist) => result @genType let distEstimateDistAnswerWithPrior: ( ~env: env, genericDist, genericDist, genericDist, ) => result @genType let distEstimateScalarAnswer: (~env: env, genericDist, float) => result @genType let distEstimateScalarAnswerWithPrior: ( ~env: env, genericDist, float, genericDist, ) => result } @genType let toPointSet: (~env: env, genericDist) => result @genType let toSampleSet: (~env: env, genericDist, int) => result @genType let fromSamples: (~env: env, SampleSetDist.t) => result @genType let truncate: (~env: env, genericDist, option, option) => result @genType let inspect: (~env: env, genericDist) => result @genType let toString: (~env: env, genericDist) => result @genType let toSparkline: (~env: env, genericDist, int) => result @genType let algebraicAdd: (~env: env, genericDist, genericDist) => result @genType let algebraicMultiply: (~env: env, genericDist, genericDist) => result @genType let algebraicDivide: (~env: env, genericDist, genericDist) => result @genType let algebraicSubtract: (~env: env, genericDist, genericDist) => result @genType let algebraicLogarithm: (~env: env, genericDist, genericDist) => result @genType let algebraicPower: (~env: env, genericDist, genericDist) => result @genType let scaleLogarithm: (~env: env, genericDist, float) => result @genType let scaleMultiply: (~env: env, genericDist, float) => result @genType let scalePower: (~env: env, genericDist, float) => result @genType let pointwiseAdd: (~env: env, genericDist, genericDist) => result @genType let pointwiseMultiply: (~env: env, genericDist, genericDist) => result @genType let pointwiseDivide: (~env: env, genericDist, genericDist) => result @genType let pointwiseSubtract: (~env: env, genericDist, genericDist) => result @genType let pointwiseLogarithm: (~env: env, genericDist, genericDist) => result @genType let pointwisePower: (~env: env, genericDist, genericDist) => result }