Removed unit from DistPlus
This commit is contained in:
parent
ea68f4d40b
commit
a5db33cedf
|
@ -30,7 +30,7 @@ let truncate: (
|
|||
~toPointSetFn: toPointSetFn,
|
||||
~leftCutoff: option<float>=?,
|
||||
~rightCutoff: option<float>=?,
|
||||
unit,
|
||||
unit
|
||||
) => result<t, error>
|
||||
|
||||
let algebraicCombination: (
|
||||
|
|
|
@ -9,12 +9,11 @@ let make =
|
|||
~pointSetDist,
|
||||
~squiggleString,
|
||||
~domain=Complete,
|
||||
~unit=UnspecifiedDistribution,
|
||||
(),
|
||||
)
|
||||
: t => {
|
||||
let integral = pointSetDistIntegral(pointSetDist);
|
||||
{pointSetDist, domain, integralCache: integral, unit, squiggleString};
|
||||
{pointSetDist, domain, integralCache: integral, squiggleString};
|
||||
};
|
||||
|
||||
let update =
|
||||
|
@ -22,14 +21,12 @@ let update =
|
|||
~pointSetDist=?,
|
||||
~integralCache=?,
|
||||
~domain=?,
|
||||
~unit=?,
|
||||
~squiggleString=?,
|
||||
t: t,
|
||||
) => {
|
||||
pointSetDist: E.O.default(t.pointSetDist, pointSetDist),
|
||||
integralCache: E.O.default(t.integralCache, integralCache),
|
||||
domain: E.O.default(t.domain, domain),
|
||||
unit: E.O.default(t.unit, unit),
|
||||
squiggleString: E.O.default(t.squiggleString, squiggleString),
|
||||
};
|
||||
|
||||
|
|
|
@ -71,25 +71,14 @@ type generationSource =
|
|||
| SquiggleString(string)
|
||||
| Shape(pointSetDist)
|
||||
|
||||
type distributionUnit =
|
||||
| UnspecifiedDistribution
|
||||
|
||||
@genType
|
||||
type distPlus = {
|
||||
pointSetDist: pointSetDist,
|
||||
domain: domain,
|
||||
integralCache: continuousShape,
|
||||
unit: distributionUnit,
|
||||
squiggleString: option<string>,
|
||||
}
|
||||
|
||||
module DistributionUnit = {
|
||||
let toJson = (distributionUnit: distributionUnit) =>
|
||||
switch distributionUnit {
|
||||
| _ => Js.Null.fromOption(None)
|
||||
}
|
||||
}
|
||||
|
||||
module Domain = {
|
||||
let excludedProbabilityMass = (t: domain) =>
|
||||
switch t {
|
||||
|
|
Loading…
Reference in New Issue
Block a user