squiggle/packages/squiggle-lang/__tests__/Bandwidth_test.res

14 lines
368 B
Plaintext
Raw Normal View History

2022-01-29 22:43:08 +00:00
open Jest
open Expect
describe("Bandwidth", () => {
test("nrd0()", () => {
2022-10-05 20:02:10 +00:00
let data = [1., 4., 3., 2.]->E.FloatArray.make
2022-04-12 23:59:40 +00:00
expect(SampleSetDist_Bandwidth.nrd0(data))->toEqual(0.7625801874014622)
2022-01-29 22:43:08 +00:00
})
test("nrd()", () => {
2022-10-05 20:02:10 +00:00
let data = [1., 4., 3., 2.]->E.FloatArray.make
2022-04-12 23:59:40 +00:00
expect(SampleSetDist_Bandwidth.nrd(data))->toEqual(0.8981499984950554)
2022-01-29 22:43:08 +00:00
})
})