use of dr.evomodel.alloppnet.speciation.AlloppNetworkPriorModel in project beast-mcmc by beast-dev.
the class AlloppNetworkPriorParser method parseXMLObject.
/*
<apspNetworkPrior id="apspnetwork.prior" units="substitutions">
<eventRate>
<parameter id="apspnetwork.prior.eventRate" value="0.1" lower="0.0" upper="Infinity"/>
</eventRate>
<apspNetwork>
<apspNetwork idref="apspnetwork"/>
</apspNetwork>
</apspNetworkPrior>
*/
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
final XMLObject mxo = xo.getChild(MODEL);
final AlloppNetworkPriorModel anpm = (AlloppNetworkPriorModel) mxo.getChild(AlloppNetworkPriorModel.class);
final XMLObject asnmxo = xo.getChild(APSPNETWORK);
final AlloppSpeciesNetworkModel asnm = (AlloppSpeciesNetworkModel) asnmxo.getChild(AlloppSpeciesNetworkModel.class);
return new AlloppNetworkPrior(anpm, asnm);
}
use of dr.evomodel.alloppnet.speciation.AlloppNetworkPriorModel in project beast-mcmc by beast-dev.
the class AlloppNetworkPriorModelParser method parseXMLObject.
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
final Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
final XMLObject erXo = xo.getChild(EVENTRATE);
final Parameter eventrate = (Parameter) erXo.getChild(Parameter.class);
final XMLObject psfXo = xo.getChild(POPULATION_SCALING_FACTOR);
final Parameter popscalingfactor = (Parameter) psfXo.getChild(Parameter.class);
final XMLObject tpdXo = xo.getChild(TIP_POPULATION_DISTRIBUTION);
ParametricDistributionModel tippopmodel = (ParametricDistributionModel) tpdXo.getChild(ParametricDistributionModel.class);
final XMLObject rpdXo = xo.getChild(ROOT_POPULATION_DISTRIBUTION);
ParametricDistributionModel rootpopmodel = (ParametricDistributionModel) rpdXo.getChild(ParametricDistributionModel.class);
final XMLObject hpdXo = xo.getChild(HYBRID_POPULATION_DISTRIBUTION);
ParametricDistributionModel hybpopmodel = (ParametricDistributionModel) hpdXo.getChild(ParametricDistributionModel.class);
return new AlloppNetworkPriorModel(eventrate, popscalingfactor, tippopmodel, rootpopmodel, hybpopmodel, units);
}
Aggregations