squiggle/packages/squiggle-lang/src/rescript/Distributions/GenericDist/GenericDist.resi

68 lines
1.6 KiB
Plaintext
Raw Normal View History

2022-03-28 12:39:07 +00:00
type t = GenericDist_Types.genericDist
type error = GenericDist_Types.error
type toPointSetFn = t => result<PointSetTypes.pointSetDist, error>
type toSampleSetFn = t => result<array<float>, error>
type scaleMultiplyFn = (t, float) => result<t, error>
type pointwiseAddFn = (t, t) => result<t, error>
let sampleN: (t, int) => result<array<float>, error>
2022-03-28 12:39:07 +00:00
let fromFloat: float => t
let toString: t => string
let normalize: t => t
let toFloatOperation: (
t,
~toPointSetFn: toPointSetFn,
~distToFloatOperation: Operation.distToFloatOperation,
) => result<float, error>
2022-03-28 12:39:07 +00:00
let toPointSet: (
~xyPointLength: int,
~sampleCount: int,
t,
) => result<PointSetTypes.pointSetDist, error>
let toSparkline: (
~sampleCount: int,
~buckets: int=?,
t,
) => result<string, error>
2022-03-28 12:39:07 +00:00
let truncate: (
t,
~toPointSetFn: toPointSetFn,
~leftCutoff: option<float>=?,
~rightCutoff: option<float>=?,
2022-04-04 15:44:42 +00:00
unit
) => result<t, error>
2022-03-28 12:39:07 +00:00
let algebraicCombination: (
2022-03-29 19:47:32 +00:00
t,
~toPointSetFn: toPointSetFn,
~toSampleSetFn: toSampleSetFn,
~arithmeticOperation: GenericDist_Types.Operation.arithmeticOperation,
~t2: t,
2022-03-28 12:39:07 +00:00
) => result<t, error>
let pointwiseCombination: (
2022-03-29 19:47:32 +00:00
t,
~toPointSetFn: toPointSetFn,
~arithmeticOperation: GenericDist_Types.Operation.arithmeticOperation,
~t2: t,
2022-03-28 12:39:07 +00:00
) => result<t, error>
let pointwiseCombinationFloat: (
2022-03-29 19:47:32 +00:00
t,
~toPointSetFn: toPointSetFn,
~arithmeticOperation: GenericDist_Types.Operation.arithmeticOperation,
~float: float,
2022-03-28 12:39:07 +00:00
) => result<t, error>
let mixture: (
array<(t, float)>,
~scaleMultiplyFn: scaleMultiplyFn,
~pointwiseAddFn: pointwiseAddFn,
) => result<t, error>