use of dr.inference.model.DefaultModel in project beast-mcmc by beast-dev.
the class DefaultModelParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) {
DefaultModel likelihood = new DefaultModel();
for (int i = 0; i < xo.getChildCount(); i++) {
Parameter parameter = (Parameter) xo.getChild(i);
likelihood.addVariable(parameter);
}
return likelihood;
}
use of dr.inference.model.DefaultModel in project beast-mcmc by beast-dev.
the class DummyLikelihoodParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) {
Model model = (Model) xo.getChild(Model.class);
Parameter parameter = (Parameter) xo.getChild(Parameter.class);
if (model == null) {
model = new DefaultModel();
}
final DummyLikelihood likelihood = new DummyLikelihood(model);
if (parameter != null) {
((DefaultModel) model).addVariable(parameter);
}
return likelihood;
}
Aggregations