All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lphy.base.bmodeltest.BModelSetFunction Maven / Gradle / Ivy

Go to download

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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy