Comment out some stuff, fix annoying react key prop error

This commit is contained in:
Sebastian Kosch 2020-06-09 21:43:35 -07:00
parent eb0ffdc6c3
commit fa1bf75acc
3 changed files with 6 additions and 10 deletions

View File

@ -339,7 +339,7 @@ let make = (~distPlus: DistTypes.distPlus) => {
<div>
{state.distributions
|> E.L.fmapi((index, config) =>
<div className="flex">
<div className="flex" key={string_of_int(index)}>
<div className="w-4/5">
<Chart distPlus config onHover={r => {setX(_ => r)}} />
</div>
@ -406,4 +406,4 @@ let make = (~distPlus: DistTypes.distPlus) => {
{state.showStats ? table(distPlus, x) : ReasonReact.null}
{state.showPercentiles ? percentiles(distPlus) : ReasonReact.null}
</div>;
};
};

View File

@ -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")

View File

@ -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 */