List of usage examples for org.apache.commons.math3.linear BlockRealMatrix getColumnVector
@Override public RealVector getColumnVector(final int column) throws OutOfRangeException
From source file:gamlss.utilities.MatrixFunctions.java
/** * Multiply vector with every row of the matrix. * @param v - vector/*from w ww . jav a2 s. co m*/ * @param m - matrix * @return v*m */ public static BlockRealMatrix multVectorMatrix(final ArrayRealVector v, final BlockRealMatrix m) { BlockRealMatrix tempM = new BlockRealMatrix(m.getRowDimension(), m.getColumnDimension()); for (int i = 0; i < m.getColumnDimension(); i++) { tempM.setColumnVector(i, v.ebeMultiply(m.getColumnVector(i))); } return tempM; }