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