Fixed implementation

Value: [0.4 to 2]
This commit is contained in:
Quinn Dougherty 2022-04-25 21:04:11 -04:00
parent 3367b82eef
commit 5ef8cf5dde

View File

@ -244,9 +244,13 @@ module AlgebraicCombination = {
~t2: t, ~t2: t,
): result<t, error> => { ): result<t, error> => {
let algebraicResult = run'(t1, ~toPointSetFn, ~toSampleSetFn, ~arithmeticOperation, ~t2) let algebraicResult = run'(t1, ~toPointSetFn, ~toSampleSetFn, ~arithmeticOperation, ~t2)
switch mode { switch (mode, algebraicResult) {
| Some(_) => algebraicResult | (None, _)
| None => Error(RequestedModeInvalidError) | (Some(AsSymbolic), Ok(Symbolic(_)))
| (Some(AsMontecarlo), Ok(DistributionTypes.SampleSet(_)))
| (Some(AsConvolution), Ok(DistributionTypes.PointSet(_)))
| (Some(_), Error(_)) => algebraicResult
| (Some(_), Ok(_)) => Error(RequestedModeInvalidError)
} }
} }
} }