lphy.base.bmodeltest.BModelSetFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lphy-base Show documentation
Show all versions of lphy-base Show documentation
The standard library of LPhy, which contains the required generative distributions and basic functions.
The newest version!
package lphy.base.bmodeltest;
import lphy.core.model.DeterministicFunction;
import lphy.core.model.Value;
import lphy.core.model.annotation.GeneratorCategory;
import lphy.core.model.annotation.GeneratorInfo;
import lphy.core.model.annotation.ParameterInfo;
public class BModelSetFunction extends DeterministicFunction {
public static final String paramName = "0";
public BModelSetFunction(@ParameterInfo(name = paramName, narrativeName = "name",
description = "the bModelTest model set name. " +
"The option includes: allreversible, transitionTransversionSplit, namedSimple, namedExtended.")
Value modelSetName) {
setParam(paramName, modelSetName);
}
@GeneratorInfo(name = "bModelSet", verbClause = "is",
category = GeneratorCategory.MODEL_AVE_SEL, examples = {"simpleBModelTest.lphy"},
description = "Returns the set of models for the given bModelTest model set name.")
public Value apply() {
Value v = (Value) getParams().get(paramName);
BModelSet.ModelSet modelSet;
modelSet = BModelSet.ModelSet.valueOf(v.value());
return new Value(new BModelSet(modelSet), this);
}
}