Renames CDFunctor
This commit is contained in:
		
							parent
							
								
									ee3816fae4
								
							
						
					
					
						commit
						efe3c67a25
					
				|  | @ -5,8 +5,8 @@ exception ShapeWrong(string); | ||||||
| describe("CDF", () => { | describe("CDF", () => { | ||||||
|   test("raise - w/o order", () => { |   test("raise - w/o order", () => { | ||||||
|     expect(() => { |     expect(() => { | ||||||
|       module CDF = |       module Cdf = | ||||||
|         CDFunctor.Make({ |         CDF.Make({ | ||||||
|           let shape: DistTypes.xyShape = { |           let shape: DistTypes.xyShape = { | ||||||
|             xs: [|10., 4., 8.|], |             xs: [|10., 4., 8.|], | ||||||
|             ys: [|8., 9., 2.|], |             ys: [|8., 9., 2.|], | ||||||
|  | @ -18,8 +18,8 @@ describe("CDF", () => { | ||||||
|   }); |   }); | ||||||
|   test("raise - with order", () => { |   test("raise - with order", () => { | ||||||
|     expect(() => { |     expect(() => { | ||||||
|       module CDF = |       module Cdf = | ||||||
|         CDFunctor.Make({ |         CDF.Make({ | ||||||
|           let shape: DistTypes.xyShape = { |           let shape: DistTypes.xyShape = { | ||||||
|             xs: [|1., 4., 8.|], |             xs: [|1., 4., 8.|], | ||||||
|             ys: [|8., 9., 2.|], |             ys: [|8., 9., 2.|], | ||||||
|  | @ -31,29 +31,27 @@ describe("CDF", () => { | ||||||
|     |> toThrow |     |> toThrow | ||||||
|   }); |   }); | ||||||
|   test("order#1", () => { |   test("order#1", () => { | ||||||
|     let a = CDFunctor.order({xs: [|1., 4., 8.|], ys: [|8., 9., 2.|]}); |     let a = CDF.order({xs: [|1., 4., 8.|], ys: [|8., 9., 2.|]}); | ||||||
|     let b: DistTypes.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); |     expect(a) |> toEqual(b); | ||||||
|   }); |   }); | ||||||
|   test("order#2", () => { |   test("order#2", () => { | ||||||
|     let a = CDFunctor.order({xs: [|10., 5., 12.|], ys: [|8., 9., 2.|]}); |     let a = CDF.order({xs: [|10., 5., 12.|], ys: [|8., 9., 2.|]}); | ||||||
|     let b: DistTypes.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); |     expect(a) |> toEqual(b); | ||||||
|   }); |   }); | ||||||
|   test("minX", () => { |   test("minX", () => { | ||||||
|     module CDF = |     module Dist = | ||||||
|       CDFunctor.Make({ |       CDF.Make({ | ||||||
|         let shape: DistTypes.xyShape = |         let shape = CDF.order({xs: [|20., 4., 8.|], ys: [|8., 9., 2.|]}); | ||||||
|           CDFunctor.order({xs: [|20., 4., 8.|], ys: [|8., 9., 2.|]}); |  | ||||||
|       }); |       }); | ||||||
|     expect(CDF.minX()) |> toEqual(4.); |     expect(Dist.minX()) |> toEqual(4.); | ||||||
|   }); |   }); | ||||||
|   test("maxX", () => { |   test("maxX", () => { | ||||||
|     module CDF = |     module Dist = | ||||||
|       CDFunctor.Make({ |       CDF.Make({ | ||||||
|         let shape: DistTypes.xyShape = |         let shape = CDF.order({xs: [|20., 4., 8.|], ys: [|8., 9., 2.|]}); | ||||||
|           CDFunctor.order({xs: [|20., 4., 8.|], ys: [|8., 9., 2.|]}); |  | ||||||
|       }); |       }); | ||||||
|     expect(CDF.maxX()) |> toEqual(20.); |     expect(Dist.maxX()) |> toEqual(20.); | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user