Search in sources :

Example 46 with DefaultTreeModel

use of dr.evomodel.tree.DefaultTreeModel in project beast-mcmc by beast-dev.

the class RLYModelTest method testTreeBitRandomWalk.

public void testTreeBitRandomWalk() {
    DefaultTreeModel treeModel = new DefaultTreeModel("treeModel", tree);
    Parameter I = treeModel.createNodeTraitsParameter(birthRateIndicator, new double[] { 1 });
    Parameter b = treeModel.createNodeTraitsParameter(birthRate, new double[] { 1 });
    OperatorSchedule schedule = new SimpleOperatorSchedule();
    TreeBitRandomWalkOperator tbrw = new TreeBitRandomWalkOperator(treeModel, birthRateIndicator, birthRate, 1.0, 4, true);
    BitFlipOperator bfo = new BitFlipOperator(I, 1.0, true);
    schedule.addOperator(tbrw);
    schedule.addOperator(bfo);
    randomLocalYuleTester(treeModel, I, b, schedule);
}
Also used : SimpleOperatorSchedule(dr.inference.operators.SimpleOperatorSchedule) OperatorSchedule(dr.inference.operators.OperatorSchedule) SimpleOperatorSchedule(dr.inference.operators.SimpleOperatorSchedule) BitFlipOperator(dr.inference.operators.BitFlipOperator) Parameter(dr.inference.model.Parameter) DefaultTreeModel(dr.evomodel.tree.DefaultTreeModel) TreeBitRandomWalkOperator(dr.evomodel.operators.TreeBitRandomWalkOperator)

Aggregations

DefaultTreeModel (dr.evomodel.tree.DefaultTreeModel)46 Tree (dr.evolution.tree.Tree)21 NewickImporter (dr.evolution.io.NewickImporter)19 Parameter (dr.inference.model.Parameter)19 ArrayList (java.util.ArrayList)14 BranchRateModel (dr.evomodel.branchratemodel.BranchRateModel)10 TreeModel (dr.evomodel.tree.TreeModel)10 GammaSiteModel (dr.oldevomodel.sitemodel.GammaSiteModel)10 HomogeneousBranchModel (dr.evomodel.branchmodel.HomogeneousBranchModel)9 GammaSiteRateModel (dr.evomodel.siteratemodel.GammaSiteRateModel)9 FrequencyModel (dr.evomodel.substmodel.FrequencyModel)9 TreeLikelihood (dr.oldevomodel.treelikelihood.TreeLikelihood)9 BeagleSequenceSimulator (dr.app.beagle.tools.BeagleSequenceSimulator)8 Partition (dr.app.beagle.tools.Partition)8 ImportException (dr.evolution.io.Importer.ImportException)8 Taxa (dr.evolution.util.Taxa)8 Taxon (dr.evolution.util.Taxon)8 DefaultBranchRateModel (dr.evomodel.branchratemodel.DefaultBranchRateModel)8 IOException (java.io.IOException)8 ExchangeOperator (dr.evomodel.operators.ExchangeOperator)7