Minor formatting
This commit is contained in:
parent
248545ee34
commit
0e7f290ff2
|
@ -98,7 +98,7 @@ module Continuous = {
|
||||||
let combinePointwise =
|
let combinePointwise =
|
||||||
(
|
(
|
||||||
~knownIntegralSumsFn,
|
~knownIntegralSumsFn,
|
||||||
fn: (float => float => float),
|
fn: (float, float) => float,
|
||||||
t1: DistTypes.continuousShape,
|
t1: DistTypes.continuousShape,
|
||||||
t2: DistTypes.continuousShape,
|
t2: DistTypes.continuousShape,
|
||||||
)
|
)
|
||||||
|
@ -217,9 +217,7 @@ module Continuous = {
|
||||||
let integral = (~cache, t) =>
|
let integral = (~cache, t) =>
|
||||||
if (t |> getShape |> XYShape.T.length > 0) {
|
if (t |> getShape |> XYShape.T.length > 0) {
|
||||||
switch (cache) {
|
switch (cache) {
|
||||||
| Some(cache) => {
|
| Some(cache) => cache
|
||||||
cache;
|
|
||||||
}
|
|
||||||
| None =>
|
| None =>
|
||||||
t
|
t
|
||||||
|> getShape
|
|> getShape
|
||||||
|
@ -243,7 +241,7 @@ module Continuous = {
|
||||||
t.knownIntegralSum |> E.O.default(t |> integral(~cache) |> lastY);
|
t.knownIntegralSum |> E.O.default(t |> integral(~cache) |> lastY);
|
||||||
let integralXtoY = (~cache, f, t: t) =>
|
let integralXtoY = (~cache, f, t: t) =>
|
||||||
t |> integral(~cache) |> shapeFn(XYShape.XtoY.linear(f));
|
t |> integral(~cache) |> shapeFn(XYShape.XtoY.linear(f));
|
||||||
let integralYtoX = (~cache, f, t: t) =>
|
let integralYtoX = (~cache, f, t: t) =>
|
||||||
t |> integral(~cache) |> shapeFn(XYShape.YtoX.linear(f));
|
t |> integral(~cache) |> shapeFn(XYShape.YtoX.linear(f));
|
||||||
let toContinuous = t => Some(t);
|
let toContinuous = t => Some(t);
|
||||||
let toDiscrete = _ => None;
|
let toDiscrete = _ => None;
|
||||||
|
@ -1236,7 +1234,7 @@ module DistPlus = {
|
||||||
// get the total of everything
|
// get the total of everything
|
||||||
let integralEndY = (~cache as _, t: t) => {
|
let integralEndY = (~cache as _, t: t) => {
|
||||||
Shape.T.Integral.sum(~cache=Some(t.integralCache), toShape(t));
|
Shape.T.Integral.sum(~cache=Some(t.integralCache), toShape(t));
|
||||||
}
|
};
|
||||||
|
|
||||||
// TODO: Fix this below, obviously. Adjust for limits
|
// TODO: Fix this below, obviously. Adjust for limits
|
||||||
let integralXtoY = (~cache as _, f, t: t) => {
|
let integralXtoY = (~cache as _, f, t: t) => {
|
||||||
|
|
|
@ -16,11 +16,6 @@ module ExpressionTree = {
|
||||||
| `FloatFromDist(distToFloatOperation, node)
|
| `FloatFromDist(distToFloatOperation, node)
|
||||||
];
|
];
|
||||||
|
|
||||||
type dist = [
|
|
||||||
| `SymbolicDist(SymbolicTypes.symbolicDist)
|
|
||||||
| `RenderedDist(DistTypes.shape)
|
|
||||||
];
|
|
||||||
|
|
||||||
type evaluationParams = {
|
type evaluationParams = {
|
||||||
sampleCount: int,
|
sampleCount: int,
|
||||||
evaluateNode: (evaluationParams, node) => Belt.Result.t(node, string),
|
evaluateNode: (evaluationParams, node) => Belt.Result.t(node, string),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user