SymbolicDistFloat adjustment for choose in ExpressionTree
This commit is contained in:
parent
95b8ba2036
commit
ac7b1ee9d5
|
@ -180,10 +180,10 @@ let make = () => {
|
||||||
unitType: "UnspecifiedDistribution",
|
unitType: "UnspecifiedDistribution",
|
||||||
zero: MomentRe.momentNow(),
|
zero: MomentRe.momentNow(),
|
||||||
unit: "days",
|
unit: "days",
|
||||||
sampleCount: "3000",
|
sampleCount: "30000",
|
||||||
outputXYPoints: "100",
|
outputXYPoints: "1000",
|
||||||
downsampleTo: "100",
|
downsampleTo: "",
|
||||||
kernelWidth: "5",
|
kernelWidth: "",
|
||||||
},
|
},
|
||||||
(),
|
(),
|
||||||
);
|
);
|
||||||
|
|
|
@ -36,6 +36,8 @@ module AlgebraicCombination = {
|
||||||
let dLength = (r: DistTypes.discreteShape) =>
|
let dLength = (r: DistTypes.discreteShape) =>
|
||||||
r.xyShape |> XYShape.T.length;
|
r.xyShape |> XYShape.T.length;
|
||||||
switch (t1, t2) {
|
switch (t1, t2) {
|
||||||
|
| (`SymbolicDist(`Float(_)), _)
|
||||||
|
| (_, `SymbolicDist(`Float(_))) => `Analytical
|
||||||
| (`RenderedDist(Continuous(_)), `RenderedDist(Continuous(_))) => `Sampling
|
| (`RenderedDist(Continuous(_)), `RenderedDist(Continuous(_))) => `Sampling
|
||||||
| (`RenderedDist(Discrete(m1)), `RenderedDist(Discrete(m2)))
|
| (`RenderedDist(Discrete(m1)), `RenderedDist(Discrete(m2)))
|
||||||
when dLength(m1) * dLength(m2) > 1000 => `Analytical
|
when dLength(m1) * dLength(m2) > 1000 => `Analytical
|
||||||
|
@ -48,7 +50,7 @@ module AlgebraicCombination = {
|
||||||
| _ => `Sampling
|
| _ => `Sampling
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
let foo =
|
let combine =
|
||||||
(evaluationParams, algebraicOp, t1: node, t2: node)
|
(evaluationParams, algebraicOp, t1: node, t2: node)
|
||||||
: result(node, string) => {
|
: result(node, string) => {
|
||||||
E.R.merge(
|
E.R.merge(
|
||||||
|
@ -90,7 +92,7 @@ module AlgebraicCombination = {
|
||||||
_,
|
_,
|
||||||
fun
|
fun
|
||||||
| `SymbolicDist(_) as t => Ok(t)
|
| `SymbolicDist(_) as t => Ok(t)
|
||||||
| _ => foo(evaluationParams, algebraicOp, t1, t2),
|
| _ => combine(evaluationParams, algebraicOp, t1, t2),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user