public static final DoubleMatrix1D diagonalMatrixMult(DoubleMatrix1D diagonalM, DoubleMatrix1D vector){
		int n = diagonalM.size();
		DoubleMatrix1D ret = DoubleFactory1D.dense.make(n);
		for(int i=0; i<n; i++){
			ret.setQuick(i, diagonalM.getQuick(i) * vector.getQuick(i));
		}
		return ret;
	}
public static final DoubleMatrix1D diagonalMatrixMult ( DoubleMatrix1D diagonalM , DoubleMatrix1D vector ) { int n = diagonalM . size ( ) ; DoubleMatrix1D ret = DoubleFactory1D . dense . make ( n ) ; for ( int i = 0 ; i < n ; i ++ ) { ret . setQuick ( i , diagonalM . getQuick ( i ) * vector . getQuick ( i ) ) ; } return ret ; }
Matrix-vector multiplication with diagonal matrix.
@param diagonalM diagonal matrix M, in the form of a vector of its diagonal elements
@param vector
@return M.x