Removed unit from DistPlus

This commit is contained in:
Ozzie Gooen 2022-04-04 11:44:42 -04:00
parent ea68f4d40b
commit a5db33cedf
3 changed files with 2 additions and 16 deletions

View File

@ -30,7 +30,7 @@ let truncate: (
~toPointSetFn: toPointSetFn,
~leftCutoff: option<float>=?,
~rightCutoff: option<float>=?,
unit,
unit
) => result<t, error>
let algebraicCombination: (

View File

@ -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),
};

View File

@ -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 {