Skip to content

Commit

Permalink
set upper boundary manually for RealParameter #169
Browse files Browse the repository at this point in the history
  • Loading branch information
EvaLiyt committed Nov 19, 2024
1 parent 0a71ee9 commit 000f24f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ public FlexibleLocalClockModel generatorToBEAST(LocalClock localClock, BEASTInte

Value<Double> rootRate = localClock.getRootRate();
StrictLineageClockModel rootCladeModel = new StrictLineageClockModel();
rootCladeModel.initByName("clock.rate", new RealParameter(rootRate.valueToString()));

RealParameter rootRateParameter = new RealParameter(rootRate.valueToString());
// specify the parameter has the upper bound at 1.0
rootRateParameter.setInputValue("upper", 1.0);

rootCladeModel.initByName("clock.rate", rootRateParameter);

Value<Object[]> clades = localClock.getClades();
Value<Double[]> cladeRates = localClock.getCladeRates();
Expand Down

0 comments on commit 000f24f

Please sign in to comment.