use of dr.evomodel.coalescent.OrnsteinUhlenbeckPriorLikelihood in project beast-mcmc by beast-dev.
the class OrnsteinUhlenbeckPriorLikelihoodParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
Parameter mean = getParam(xo, MEAN);
Parameter sigma = getParam(xo, SIGMA);
Parameter lambda = getParam(xo, LAMBDA);
final boolean logSpace = xo.getAttribute(LOG_SPACE, false);
final boolean normalize = xo.getAttribute(NORMALIZE, false);
VariableDemographicModel m = (VariableDemographicModel) xo.getChild(VariableDemographicModel.class);
if (m != null) {
ParametricDistributionModel popMeanPrior = (ParametricDistributionModel) xo.getChild(ParametricDistributionModel.class);
return new OrnsteinUhlenbeckPriorLikelihood(mean, sigma, lambda, m, logSpace, normalize, popMeanPrior);
}
final XMLObject cxo1 = xo.getChild(DATA);
Parameter dataParameter = (Parameter) cxo1.getChild(Parameter.class);
final XMLObject cxo2 = xo.getChild(TIMES);
final Parameter timesParameter = (Parameter) cxo2.getChild(Parameter.class);
return new OrnsteinUhlenbeckPriorLikelihood(mean, sigma, lambda, dataParameter, timesParameter, logSpace, normalize);
}
Aggregations