From fa1bf75acc608da16f080fc8d5ecb0c7636769be Mon Sep 17 00:00:00 2001 From: Sebastian Kosch Date: Tue, 9 Jun 2020 21:43:35 -0700 Subject: [PATCH] Comment out some stuff, fix annoying react key prop error --- src/components/charts/DistPlusPlot.re | 4 ++-- src/distPlus/symbolic/MathJsParser.re | 8 ++------ src/distPlus/symbolic/SymbolicDist.re | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/charts/DistPlusPlot.re b/src/components/charts/DistPlusPlot.re index a6b35f22..9eb484ef 100644 --- a/src/components/charts/DistPlusPlot.re +++ b/src/components/charts/DistPlusPlot.re @@ -339,7 +339,7 @@ let make = (~distPlus: DistTypes.distPlus) => {
{state.distributions |> E.L.fmapi((index, config) => -
+
{setX(_ => r)}} />
@@ -406,4 +406,4 @@ let make = (~distPlus: DistTypes.distPlus) => { {state.showStats ? table(distPlus, x) : ReasonReact.null} {state.showPercentiles ? percentiles(distPlus) : ReasonReact.null}
; -}; \ No newline at end of file +}; diff --git a/src/distPlus/symbolic/MathJsParser.re b/src/distPlus/symbolic/MathJsParser.re index 0a0c5e0c..41667ad8 100644 --- a/src/distPlus/symbolic/MathJsParser.re +++ b/src/distPlus/symbolic/MathJsParser.re @@ -263,11 +263,8 @@ module MathAdtToDistDst = { | Object(_) => Error("Object not valid as top level") ); - let run = (r): result(SymbolicDist.bigDist, string) => { - let o = r |> MathAdtCleaner.run |> topLevel; - Js.log2("parser output", o); - o - }; + let run = (r): result(SymbolicDist.bigDist, string) => + r |> MathAdtCleaner.run |> topLevel; }; let fromString = str => { @@ -282,7 +279,6 @@ let fromString = str => { let mathJsToJson = Mathjs.parseMath(str); let mathJsParse = E.R.bind(mathJsToJson, r => { - Js.log2("parsed", r); switch (MathJsonToMathJsAdt.run(r)) { | Some(r) => Ok(r) | None => Error("MathJsParse Error") diff --git a/src/distPlus/symbolic/SymbolicDist.re b/src/distPlus/symbolic/SymbolicDist.re index 38a4b272..05eec52c 100644 --- a/src/distPlus/symbolic/SymbolicDist.re +++ b/src/distPlus/symbolic/SymbolicDist.re @@ -64,7 +64,7 @@ type dist = [ - IndependentVariableProduct(WeightedDist, WeightedDist) [i.e. distribution product] */ -type weightedDist = (float, dist); +/*type weightedDist = (float, dist); type bigDistTree = /* | DistLeaf(dist) */ @@ -79,7 +79,7 @@ let rec treeIntegral = item => { | PointwiseNormalizedDistSum(childTrees) => childTrees |> E.A.fmap(treeIntegral) |> E.A.Floats.sum }; -}; +};*/ /* bigDist can either be a single distribution, or a PointwiseCombination, i.e. an array of (dist, weight) tuples */