Search in sources :

Example 1 with AlloppChangeNumHybridizations

use of dr.evomodel.alloppnet.operators.AlloppChangeNumHybridizations in project beast-mcmc by beast-dev.

the class AlloppChangeNumHybridizationsParser method parseXMLObject.

@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    AlloppSpeciesBindings apsp = (AlloppSpeciesBindings) xo.getChild(AlloppSpeciesBindings.class);
    AlloppSpeciesNetworkModel apspnet = (AlloppSpeciesNetworkModel) xo.getChild(AlloppSpeciesNetworkModel.class);
    if (apspnet.getOneHybridization()) {
        throw new XMLParseException("oneHybridization is set to true but there is a changeNumHybridizations operator");
    }
    final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
    return new AlloppChangeNumHybridizations(apspnet, apsp, weight);
}
Also used : AlloppSpeciesNetworkModel(dr.evomodel.alloppnet.speciation.AlloppSpeciesNetworkModel) AlloppSpeciesBindings(dr.evomodel.alloppnet.speciation.AlloppSpeciesBindings) AlloppChangeNumHybridizations(dr.evomodel.alloppnet.operators.AlloppChangeNumHybridizations)

Aggregations

AlloppChangeNumHybridizations (dr.evomodel.alloppnet.operators.AlloppChangeNumHybridizations)1 AlloppSpeciesBindings (dr.evomodel.alloppnet.speciation.AlloppSpeciesBindings)1 AlloppSpeciesNetworkModel (dr.evomodel.alloppnet.speciation.AlloppSpeciesNetworkModel)1