2022-04-26 16:22:31 +00:00
|
|
|
open Jest
|
|
|
|
open Expect
|
|
|
|
|
|
|
|
describe("Converting from a sample set distribution", () => {
|
|
|
|
test("Should be normalized", () => {
|
|
|
|
let outputXYShape = SampleSetDist_ToPointSet.Internals.KDE.normalSampling(
|
|
|
|
[1., 2., 3., 3., 4., 5., 5., 5., 6., 8., 9., 9.],
|
|
|
|
50,
|
|
|
|
2,
|
|
|
|
)
|
|
|
|
let c: PointSetTypes.continuousShape = {
|
|
|
|
xyShape: outputXYShape,
|
|
|
|
interpolation: #Linear,
|
|
|
|
integralSumCache: None,
|
|
|
|
integralCache: None,
|
|
|
|
}
|
|
|
|
|
2022-04-26 17:25:45 +00:00
|
|
|
expect(Continuous.isNormalized(c))->toBe(true)
|
2022-04-26 16:22:31 +00:00
|
|
|
})
|
|
|
|
})
|