diff --git a/__tests__/CDFunctor__Test.re b/__tests__/CDFunctor__Test.re index 69e483e3..fef9affb 100644 --- a/__tests__/CDFunctor__Test.re +++ b/__tests__/CDFunctor__Test.re @@ -7,7 +7,7 @@ describe("CDF", () => { expect(() => { module CDF = CDFunctor.Make({ - let shape: DistributionTypes.xyShape = { + let shape: DistTypes.xyShape = { xs: [|10., 4., 8.|], ys: [|8., 9., 2.|], }; @@ -20,7 +20,7 @@ describe("CDF", () => { expect(() => { module CDF = CDFunctor.Make({ - let shape: DistributionTypes.xyShape = { + let shape: DistTypes.xyShape = { xs: [|1., 4., 8.|], ys: [|8., 9., 2.|], }; @@ -32,24 +32,18 @@ describe("CDF", () => { }); test("order#1", () => { let a = CDFunctor.order({xs: [|1., 4., 8.|], ys: [|8., 9., 2.|]}); - let b: DistributionTypes.xyShape = { - xs: [|1., 4., 8.|], - ys: [|8., 9., 2.|], - }; + let b: DistTypes.xyShape = {xs: [|1., 4., 8.|], ys: [|8., 9., 2.|]}; expect(a) |> toEqual(b); }); test("order#2", () => { let a = CDFunctor.order({xs: [|10., 5., 12.|], ys: [|8., 9., 2.|]}); - let b: DistributionTypes.xyShape = { - xs: [|5., 10., 12.|], - ys: [|9., 8., 2.|], - }; + let b: DistTypes.xyShape = {xs: [|5., 10., 12.|], ys: [|9., 8., 2.|]}; expect(a) |> toEqual(b); }); test("minX", () => { module CDF = CDFunctor.Make({ - let shape: DistributionTypes.xyShape = + let shape: DistTypes.xyShape = CDFunctor.order({xs: [|20., 4., 8.|], ys: [|8., 9., 2.|]}); }); expect(CDF.minX()) |> toEqual(4.); @@ -57,7 +51,7 @@ describe("CDF", () => { test("maxX", () => { module CDF = CDFunctor.Make({ - let shape: DistributionTypes.xyShape = + let shape: DistTypes.xyShape = CDFunctor.order({xs: [|20., 4., 8.|], ys: [|8., 9., 2.|]}); }); expect(CDF.maxX()) |> toEqual(20.); diff --git a/src/Index.bs.js b/src/Index.bs.js deleted file mode 100644 index d28cff64..00000000 --- a/src/Index.bs.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var React = require("react"); -var ReactDOMRe = require("reason-react/src/ReactDOMRe.js"); -var App$ProbExample = require("./App.bs.js"); - -((import('./styles/index.css'))); - -ReactDOMRe.renderToElementWithId(React.createElement(App$ProbExample.make, { }), "app"); - -/* Not a pure module */ diff --git a/src/utility/lib/CDFunctor.re b/src/utility/lib/CDFunctor.re index 3db4f574..c9e0a19e 100644 --- a/src/utility/lib/CDFunctor.re +++ b/src/utility/lib/CDFunctor.re @@ -1,8 +1,8 @@ -module type Config = {let shape: DistributionTypes.xyShape;}; +module type Config = {let shape: DistTypes.xyShape;}; exception ShapeWrong(string); -let order = (shape: DistributionTypes.xyShape): DistributionTypes.xyShape => { +let order = (shape: DistTypes.xyShape): DistTypes.xyShape => { let xy = shape.xs |> Array.mapi((i, x) => [x, shape.ys |> Array.get(_, i)])