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>
|
|
|
|
|
2022-03-29 18:36:54 +00:00
|
|
|
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-31 18:07:39 +00:00
|
|
|
let toFloatOperation: (
|
2022-03-31 13:19:27 +00:00
|
|
|
t,
|
|
|
|
~toPointSetFn: toPointSetFn,
|
2022-03-31 18:07:39 +00:00
|
|
|
~distToFloatOperation: Operation.distToFloatOperation,
|
2022-03-31 13:19:27 +00:00
|
|
|
) => result<float, error>
|
2022-03-28 12:39:07 +00:00
|
|
|
|
2022-03-31 18:07:39 +00:00
|
|
|
let toPointSet: (
|
|
|
|
~xyPointLength: int,
|
|
|
|
~sampleCount: int,
|
|
|
|
t,
|
|
|
|
) => result<PointSetTypes.pointSetDist, error>
|
2022-03-28 12:39:07 +00:00
|
|
|
|
2022-03-31 13:19:27 +00:00
|
|
|
let truncate: (
|
|
|
|
t,
|
|
|
|
~toPointSetFn: toPointSetFn,
|
|
|
|
~leftCutoff: option<float>=?,
|
|
|
|
~rightCutoff: option<float>=?,
|
|
|
|
unit,
|
|
|
|
) => result<t, error>
|
2022-03-28 12:39:07 +00:00
|
|
|
|
|
|
|
let algebraicCombination: (
|
2022-03-29 19:47:32 +00:00
|
|
|
t,
|
2022-03-31 13:19:27 +00:00
|
|
|
~toPointSetFn: toPointSetFn,
|
|
|
|
~toSampleSetFn: toSampleSetFn,
|
2022-03-31 18:07:39 +00:00
|
|
|
~arithmeticOperation: GenericDist_Types.Operation.arithmeticOperation,
|
2022-03-31 13:19:27 +00:00
|
|
|
~t2: t,
|
2022-03-28 12:39:07 +00:00
|
|
|
) => result<t, error>
|
|
|
|
|
|
|
|
let pointwiseCombination: (
|
2022-03-29 19:47:32 +00:00
|
|
|
t,
|
2022-03-31 13:19:27 +00:00
|
|
|
~toPointSetFn: toPointSetFn,
|
2022-03-31 18:07:39 +00:00
|
|
|
~arithmeticOperation: GenericDist_Types.Operation.arithmeticOperation,
|
2022-03-31 13:19:27 +00:00
|
|
|
~t2: t,
|
2022-03-28 12:39:07 +00:00
|
|
|
) => result<t, error>
|
|
|
|
|
|
|
|
let pointwiseCombinationFloat: (
|
2022-03-29 19:47:32 +00:00
|
|
|
t,
|
2022-03-31 13:19:27 +00:00
|
|
|
~toPointSetFn: toPointSetFn,
|
2022-03-31 18:07:39 +00:00
|
|
|
~arithmeticOperation: GenericDist_Types.Operation.arithmeticOperation,
|
2022-03-31 13:19:27 +00:00
|
|
|
~float: float,
|
2022-03-28 12:39:07 +00:00
|
|
|
) => result<t, error>
|
|
|
|
|
2022-03-31 13:19:27 +00:00
|
|
|
let mixture: (
|
|
|
|
array<(t, float)>,
|
|
|
|
~scaleMultiplyFn: scaleMultiplyFn,
|
|
|
|
~pointwiseAddFn: pointwiseAddFn,
|
|
|
|
) => result<t, error>
|