use of dr.inference.model.MatrixVectorProductParameter in project beast-mcmc by beast-dev.
the class MatrixVectorProductParameterParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
MatrixParameter matrix = (MatrixParameter) xo.getChild(MATRIX).getChild(MatrixParameter.class);
Parameter vector = (Parameter) xo.getChild(VECTOR).getChild(Parameter.class);
if (matrix.getColumnDimension() != vector.getDimension()) {
throw new XMLParseException("Wrong matrix-vector dimensions in " + xo.getId());
}
return new MatrixVectorProductParameter(matrix, vector);
}
Aggregations