Minor changes
This commit is contained in:
parent
d772dc3841
commit
a37078d839
|
@ -165,7 +165,7 @@ let make = () => {
|
||||||
~onSubmit=({state}) => {None},
|
~onSubmit=({state}) => {None},
|
||||||
~initialState={
|
~initialState={
|
||||||
guesstimatorString: "mm(5 to 20, floor(normal(20,2)), [.5, .5])",
|
guesstimatorString: "mm(5 to 20, floor(normal(20,2)), [.5, .5])",
|
||||||
domainType: "LeftLimited",
|
domainType: "Complete",
|
||||||
xPoint: 50.0,
|
xPoint: 50.0,
|
||||||
xPoint2: 60.0,
|
xPoint2: 60.0,
|
||||||
excludingProbabilityMass2: 0.5,
|
excludingProbabilityMass2: 0.5,
|
||||||
|
|
|
@ -21,30 +21,28 @@ let propValue = (t: Prop.Value.t) => {
|
||||||
let newDistribution =
|
let newDistribution =
|
||||||
DistPlusIngredients.toDistPlus(
|
DistPlusIngredients.toDistPlus(
|
||||||
~sampleCount=2000,
|
~sampleCount=2000,
|
||||||
~outputXYPoints=2000,
|
~outputXYPoints=1000,
|
||||||
~truncateTo=Some(100),
|
~truncateTo=Some(500),
|
||||||
r,
|
r,
|
||||||
);
|
);
|
||||||
switch (newDistribution) {
|
switch (newDistribution) {
|
||||||
| Some(distribution) =>
|
| Some(distribution) =>
|
||||||
<div>
|
<div> <DistPlusPlot distPlus=distribution /> </div>
|
||||||
<DistPlusPlot distPlus=distribution />
|
// <input
|
||||||
<input
|
// readOnly=true
|
||||||
readOnly=true
|
// className="shadow appearance-none border w-1/3 rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
|
||||||
className="shadow appearance-none border w-1/3 rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
|
// value={r.guesstimatorString}
|
||||||
value={r.guesstimatorString}
|
// />
|
||||||
/>
|
// <select
|
||||||
<select
|
// defaultValue="years"
|
||||||
defaultValue="years"
|
// readOnly=true
|
||||||
readOnly=true
|
// className="appearance-none w-32 bg-white border border-gray-400 hover:border-gray-500 px-4 py-2 pr-8 rounded shadow leading-tight focus:outline-none focus:shadow-outline">
|
||||||
className="appearance-none w-32 bg-white border border-gray-400 hover:border-gray-500 px-4 py-2 pr-8 rounded shadow leading-tight focus:outline-none focus:shadow-outline">
|
// <option> {"years" |> ReasonReact.string} </option>
|
||||||
<option> {"years" |> ReasonReact.string} </option>
|
// </select>
|
||||||
</select>
|
// <div
|
||||||
<div
|
// className="w-1/3 border w-1/2 rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline bg-white">
|
||||||
className="w-1/3 border w-1/2 rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline bg-white">
|
// {"30 to infinity, 80% mass" |> ReasonReact.string}
|
||||||
{"30 to infinity, 80% mass" |> ReasonReact.string}
|
// </div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
| None => "Something went wrong" |> ReasonReact.string
|
| None => "Something went wrong" |> ReasonReact.string
|
||||||
};
|
};
|
||||||
| FloatCdf(_) => <div />
|
| FloatCdf(_) => <div />
|
||||||
|
|
|
@ -236,6 +236,23 @@ module TypeWithMetadata = {
|
||||||
~assumptionType=PRIMARY_INPUT,
|
~assumptionType=PRIMARY_INPUT,
|
||||||
(),
|
(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let sex =
|
||||||
|
make(
|
||||||
|
~id="sex",
|
||||||
|
~name="Sex",
|
||||||
|
~description=None,
|
||||||
|
~type_=
|
||||||
|
SelectSingle({
|
||||||
|
options: [
|
||||||
|
{id: "male", name: "Male"},
|
||||||
|
{id: "female", name: "Female"},
|
||||||
|
],
|
||||||
|
default: Some("female"),
|
||||||
|
}),
|
||||||
|
~assumptionType=PRIMARY_INPUT,
|
||||||
|
(),
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
module Model = {
|
module Model = {
|
||||||
|
|
|
@ -21,7 +21,8 @@ module Interface = {
|
||||||
|
|
||||||
let run = (p: array(option(Prop.Value.t))) => {
|
let run = (p: array(option(Prop.Value.t))) => {
|
||||||
switch (p) {
|
switch (p) {
|
||||||
| [|Some(FloatPoint(age))|] => Some(Model.make(age))
|
| [|Some(FloatPoint(age)), Some(SelectSingle(sex))|] =>
|
||||||
|
Some(Model.make(age))
|
||||||
| _ => None
|
| _ => None
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,7 +35,7 @@ module Interface = {
|
||||||
description: "When will you die?",
|
description: "When will you die?",
|
||||||
version: "1.0.0",
|
version: "1.0.0",
|
||||||
author: "Ozzie Gooen",
|
author: "Ozzie Gooen",
|
||||||
inputTypes: [|TypeWithMetadata.age|],
|
inputTypes: [|TypeWithMetadata.age, TypeWithMetadata.sex|],
|
||||||
outputTypes: [||],
|
outputTypes: [||],
|
||||||
run,
|
run,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user