squiggle/packages/squiggle-lang/src/rescript/Utility/SamplingInputs.res

22 lines
571 B
Plaintext
Raw Normal View History

2022-02-16 22:37:59 +00:00
type samplingInputs = {
sampleCount: int,
outputXYPoints: int,
kernelWidth: option<float>,
pointSetDistLength: int,
}
module SamplingInputs = {
type t = {
sampleCount: option<int>,
outputXYPoints: option<int>,
kernelWidth: option<float>,
pointSetDistLength: option<int>,
}
let withDefaults = (t: t): samplingInputs => {
sampleCount: t.sampleCount |> E.O.default(10000),
outputXYPoints: t.outputXYPoints |> E.O.default(10000),
kernelWidth: t.kernelWidth,
pointSetDistLength: t.pointSetDistLength |> E.O.default(10000),
}
}