use of dr.evomodel.alloppnet.speciation.MulSpeciesBindings in project beast-mcmc by beast-dev.
the class MulTreeNodeSlideParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
MulSpeciesBindings species = (MulSpeciesBindings) xo.getChild(MulSpeciesBindings.class);
MulSpeciesTreeModel tree = (MulSpeciesTreeModel) xo.getChild(MulSpeciesTreeModel.class);
final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
//final boolean oo = xo.getAttribute("outgroup", false);
return new MulTreeNodeSlide(tree, species, /*, oo*/
weight);
}
use of dr.evomodel.alloppnet.speciation.MulSpeciesBindings in project beast-mcmc by beast-dev.
the class MulMSCoalescentParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
final MulSpeciesBindings sb = (MulSpeciesBindings) xo.getChild(MulSpeciesBindings.class);
final MulSpeciesTreeModel tree = (MulSpeciesTreeModel) xo.getChild(MulSpeciesTreeModel.class);
return new MulMSCoalescent(sb, tree);
}
use of dr.evomodel.alloppnet.speciation.MulSpeciesBindings in project beast-mcmc by beast-dev.
the class MulSpeciesTreeModelParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
MulSpeciesBindings spb = (MulSpeciesBindings) xo.getChild(MulSpeciesBindings.class);
final Boolean cr = xo.getAttribute(CONST_ROOT_POPULATION, false);
final Boolean cp = xo.getAttribute(CONSTANT_POPULATION, false);
final XMLObject cxo = xo.getChild(SPP_SPLIT_POPULATIONS);
final double value = cxo.getAttribute(Attributable.VALUE, 1.0);
final boolean nonConstRootPopulation = !cr;
final Parameter sppSplitPopulations = MulSpeciesTreeModel.createSplitPopulationsParameter(spb, value, nonConstRootPopulation, cp);
ParameterParser.replaceParameter(cxo, sppSplitPopulations);
final Parameter.DefaultBounds bounds = new Parameter.DefaultBounds(Double.MAX_VALUE, 0, sppSplitPopulations.getDimension());
sppSplitPopulations.addBounds(bounds);
//(Tree) xo.getChild(Tree.class);
final Tree startTree = null;
return new MulSpeciesTreeModel(spb, sppSplitPopulations, null, null, startTree, false, nonConstRootPopulation, cp);
}
use of dr.evomodel.alloppnet.speciation.MulSpeciesBindings in project beast-mcmc by beast-dev.
the class MulTreeSequenceReassignmentParser method parseXMLObject.
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
MulSpeciesBindings mulspb = (MulSpeciesBindings) xo.getChild(MulSpeciesBindings.class);
MulSpeciesTreeModel multree = (MulSpeciesTreeModel) xo.getChild(MulSpeciesTreeModel.class);
final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
return new MulTreeSequenceReassignment(multree, mulspb, weight);
}
Aggregations