Step 1
This commit is contained in:
parent
961db72adf
commit
ff13b144e6
7
src/utility/lib/CDFunctor.re
Normal file
7
src/utility/lib/CDFunctor.re
Normal file
|
@ -0,0 +1,7 @@
|
|||
module type Config = {let shape: DistributionTypes.xyShape;};
|
||||
|
||||
module Make = (Config: Config) => {
|
||||
let validateHasLength = (): bool => Array.length(Config.shape.xs) > 0;
|
||||
let validateSize = (): bool =>
|
||||
Array.length(Config.shape.xs) == Array.length(Config.shape.ys);
|
||||
};
|
8
src/utility/lib/CDFunctor__Test.re
Normal file
8
src/utility/lib/CDFunctor__Test.re
Normal file
|
@ -0,0 +1,8 @@
|
|||
module CDFConfig = {
|
||||
let shape: DistributionTypes.xyShape = {
|
||||
xs: [|1., 4., 8.|],
|
||||
ys: [|8., 9., 2.|],
|
||||
};
|
||||
};
|
||||
|
||||
module CDF = CDFunctor.Make(CDFConfig);
|
Loading…
Reference in New Issue
Block a user