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

45 lines
1.2 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
2022-03-29 19:47:32 +00:00
let operationToFloat: (t, toPointSetFn, Operation.distToFloatOperation) => result<float, error>
2022-03-28 12:39:07 +00:00
let toPointSet: (t, int) => result<PointSetTypes.pointSetDist, error>
2022-03-28 12:39:07 +00:00
2022-03-29 19:47:32 +00:00
let truncate: (t, toPointSetFn, option<float>, option<float>) => result<t, error>
2022-03-28 12:39:07 +00:00
let algebraicCombination: (
2022-03-29 19:47:32 +00:00
t,
2022-03-28 12:39:07 +00:00
toPointSetFn,
toSampleSetFn,
GenericDist_Types.Operation.arithmeticOperation,
t,
) => result<t, error>
let pointwiseCombination: (
2022-03-29 19:47:32 +00:00
t,
2022-03-28 12:39:07 +00:00
toPointSetFn,
GenericDist_Types.Operation.arithmeticOperation,
t,
) => result<t, error>
let pointwiseCombinationFloat: (
2022-03-29 19:47:32 +00:00
t,
2022-03-28 12:39:07 +00:00
toPointSetFn,
GenericDist_Types.Operation.arithmeticOperation,
float,
) => result<t, error>
2022-03-29 19:47:32 +00:00
let mixture: (array<(t, float)>, scaleMultiplyFn, pointwiseAddFn) => result<t, error>