Normalize after trunctae
This commit is contained in:
parent
906878f19f
commit
7ceae18611
|
@ -80,6 +80,7 @@ describe("eval on distribution functions", () => {
|
||||||
testEval("truncateLeft(normal(5,2), 3)", "Ok(Point Set Distribution)")
|
testEval("truncateLeft(normal(5,2), 3)", "Ok(Point Set Distribution)")
|
||||||
testEval("truncateRight(normal(5,2), 3)", "Ok(Point Set Distribution)")
|
testEval("truncateRight(normal(5,2), 3)", "Ok(Point Set Distribution)")
|
||||||
testEval("truncate(normal(5,2), 3, 8)", "Ok(Point Set Distribution)")
|
testEval("truncate(normal(5,2), 3, 8)", "Ok(Point Set Distribution)")
|
||||||
|
testEval("isNormalized(truncate(normal(5,2), 3, 8))", "Ok(true)")
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("exp", () => {
|
describe("exp", () => {
|
||||||
|
|
|
@ -214,7 +214,7 @@ module Truncate = {
|
||||||
| Some(r) => Ok(r)
|
| Some(r) => Ok(r)
|
||||||
| None =>
|
| None =>
|
||||||
toPointSetFn(t)->E.R2.fmap(t => {
|
toPointSetFn(t)->E.R2.fmap(t => {
|
||||||
DistributionTypes.PointSet(PointSetDist.T.truncate(leftCutoff, rightCutoff, t))
|
DistributionTypes.PointSet(PointSetDist.T.truncate(leftCutoff, rightCutoff, t)->PointSetDist.T.normalize)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user