diff --git a/showcase/entries/Continuous.re b/showcase/entries/Continuous.re
index 1f2adebf..d33dae77 100644
--- a/showcase/entries/Continuous.re
+++ b/showcase/entries/Continuous.re
@@ -1,30 +1,87 @@
// "mm(floor(uniform(30,35)), normal(50,20), [.25,.5])",
// "mm(floor(normal(28,4)), normal(32,2), uniform(20,24), [.5,.2,.1])",
-let timeVector: TimeTypes.timeVector = {
- zero: MomentRe.momentNow(),
- unit: `years,
-};
let timeDist =
DistPlusIngredients.make(
~guesstimatorString="mm(floor(10 to 15), 10 to 11, [.9,.1])",
~domain=Complete,
- ~unit=DistTypes.TimeDistribution(timeVector),
+ ~unit=
+ DistTypes.TimeDistribution({zero: MomentRe.momentNow(), unit: `years}),
(),
- )
+ );
+
+let setup = dist =>
+ dist
|> DistPlusIngredients.toDistPlus(~sampleCount=5000, ~outputXYPoints=1000);
let distributions = () =>
-
{"Basic Mixed Distribution" |> ReasonReact.string}
- {timeDist
- |> E.O.fmap(
- Distributions.DistPlus.T.scaleToIntegralSum(~intendedSum=1.0),
- )
+ {"Single-Discrete" |> ReasonReact.string}
+ {setup(
+ DistPlusIngredients.make(
+ ~guesstimatorString="floor(10 to 14)",
+ ~domain=Complete,
+ (),
+ ),
+ )
|> E.O.React.fmapOrNull(distPlus => )}
- {"Simple Continuous" |> ReasonReact.string}
;
+// |> E.O.React.fmapOrNull(distPlus => )}
+// )
+// ),
+// (),
+// ~domain=Complete,
+// ~guesstimatorString="(5 to 10)",
+// DistPlusIngredients.make(
+// {setup(
+// {"Continuous Only" |> ReasonReact.string}
+// |> E.O.React.fmapOrNull(distPlus => )}
+// )
+// ),
+// (),
+// ~domain=Complete,
+// ~guesstimatorString="floor(5 to 10)",
+// DistPlusIngredients.make(
+// {setup(
+// {"Discrete Only" |> ReasonReact.string}
+// |> E.O.React.fmapOrNull(distPlus => )}
+// )
+// ),
+// (),
+// ~domain=Complete,
+// ~guesstimatorString="mm(floor(10 to 15), 10 to 11, [.9,.1])",
+// DistPlusIngredients.make(
+// {setup(
+// {"Simple Mixed Distribution" |> ReasonReact.string}
+// |> E.O.React.fmapOrNull(distPlus => )}
+// )
+// ),
+// (),
+// }),
+// unit: `days,
+// zero: MomentRe.momentNow(),
+// DistTypes.TimeDistribution({
+// ~unit=
+// ~domain=Complete,
+// ~guesstimatorString="mm(floor(10 to 15), 10 to 11, [.9,.1])",
+// DistPlusIngredients.make(
+// {setup(
+// {"Complex Distribution Days" |> ReasonReact.string}
+// |> E.O.React.fmapOrNull(distPlus => )}
+// )
+// ),
+// (),
+// }),
+// unit: `years,
+// zero: MomentRe.momentNow(),
+// DistTypes.TimeDistribution({
+// ~unit=
+// ~domain=Complete,
+// ~guesstimatorString="mm(floor(10 to 15), 10 to 11, [.9,.1])",
+// DistPlusIngredients.make(
+// {setup(
+// {"Complex Distribution" |> ReasonReact.string}
let entry = EntryTypes.(entry(~title="Pdf", ~render=distributions));
\ No newline at end of file
diff --git a/src/components/charts/DistPlusPlot.re b/src/components/charts/DistPlusPlot.re
index 87a3ade8..9924932d 100644
--- a/src/components/charts/DistPlusPlot.re
+++ b/src/components/charts/DistPlusPlot.re
@@ -32,6 +32,7 @@ module IntegralChart = {
let continuous =
integral
|> T.toContinuous
+ |> E.O.bind(_, Distributions.Continuous.toLinear)
|> E.O.fmap(Distributions.Continuous.getShape);
let minX = T.minX(integral);
let maxX = T.maxX(integral);
diff --git a/src/distributions/DistPlusIngredients.re b/src/distributions/DistPlusIngredients.re
index b08fcda1..b1174737 100644
--- a/src/distributions/DistPlusIngredients.re
+++ b/src/distributions/DistPlusIngredients.re
@@ -18,8 +18,7 @@ let toDistPlus =
~outputXYPoints,
(),
);
- Js.log2("Line 21 with shape:", shape);
- let ss =
+ let distPlus =
shape
|> E.O.fmap(
Distributions.DistPlus.make(
@@ -29,6 +28,9 @@ let toDistPlus =
~guesstimatorString=None,
(),
),
+ )
+ |> E.O.fmap(
+ Distributions.DistPlus.T.scaleToIntegralSum(~intendedSum=1.0),
);
- ss;
+ distPlus;
};
\ No newline at end of file