use of dr.evomodel.branchratemodel.BranchRateGradientWrtIncrements in project beast-mcmc by beast-dev.
the class BranchRateGradientWrtIncrementsParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
AutoCorrelatedGradientWrtIncrements priorProvider = (AutoCorrelatedGradientWrtIncrements) xo.getChild(AutoCorrelatedGradientWrtIncrements.class);
GradientWrtParameterProvider rateProvider = (GradientWrtParameterProvider) xo.getChild(GradientWrtParameterProvider.class);
if (!(rateProvider instanceof BranchRateGradient) && !(rateProvider instanceof BranchRateGradientForDiscreteTrait)) {
throw new XMLParseException("Must provide a branch rate gradient");
}
return new BranchRateGradientWrtIncrements(rateProvider, priorProvider);
}
Aggregations