Fixed implementation
Value: [0.4 to 2]
This commit is contained in:
parent
3367b82eef
commit
5ef8cf5dde
|
@ -244,9 +244,13 @@ module AlgebraicCombination = {
|
|||
~t2: t,
|
||||
): result<t, error> => {
|
||||
let algebraicResult = run'(t1, ~toPointSetFn, ~toSampleSetFn, ~arithmeticOperation, ~t2)
|
||||
switch mode {
|
||||
| Some(_) => algebraicResult
|
||||
| None => Error(RequestedModeInvalidError)
|
||||
switch (mode, algebraicResult) {
|
||||
| (None, _)
|
||||
| (Some(AsSymbolic), Ok(Symbolic(_)))
|
||||
| (Some(AsMontecarlo), Ok(DistributionTypes.SampleSet(_)))
|
||||
| (Some(AsConvolution), Ok(DistributionTypes.PointSet(_)))
|
||||
| (Some(_), Error(_)) => algebraicResult
|
||||
| (Some(_), Ok(_)) => Error(RequestedModeInvalidError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user