Search in sources :

Example 1 with MatrixVectorProductParameter

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);
}
Also used : MatrixParameter(dr.inference.model.MatrixParameter) MatrixVectorProductParameter(dr.inference.model.MatrixVectorProductParameter) MatrixVectorProductParameter(dr.inference.model.MatrixVectorProductParameter) Parameter(dr.inference.model.Parameter) MatrixParameter(dr.inference.model.MatrixParameter)

Aggregations

MatrixParameter (dr.inference.model.MatrixParameter)1 MatrixVectorProductParameter (dr.inference.model.MatrixVectorProductParameter)1 Parameter (dr.inference.model.Parameter)1