cdm/src/main/java/ucar/ma2/MAMatrix.java
public void postMultiplyDiagonal(MAVector diag) {

    if (ncols != diag.getNelems())
      throw new IllegalArgumentException("MAMatrix.postMultiplyDiagonal "+ncols+" != "+ diag.getNelems());

    for (int i=0; i<nrows; i++) {
      for (int j=0; j<ncols; j++) {
        double val = a.getDouble( ima.set(i,j)) * diag.getDouble(j);
        a.setDouble( ima, val);
      }
    }
  }
public void postMultiplyDiagonal(MAVector diag) {

    if (ncols != diag.getNelems())
      throw new IllegalArgumentException("MAMatrix.postMultiplyDiagonal "+ncols+" != "+ diag.getNelems());

    for (int i=0; i<nrows; i++) {
      for (int j=0; j<ncols; j++) {
        double val = a.getDouble( ima.set(i,j)) * diag.getDouble(j);
        a.setDouble( ima, val);
      }
    }
  }
public void postMultiplyDiagonal ( MAVector diag ) { if ( ncols != diag . getNelems ( ) ) throw new IllegalArgumentException ( "MAMatrix.postMultiplyDiagonal " + ncols + " != " + diag . getNelems ( ) ) ; for ( int i = 0 ; i < nrows ; i ++ ) { for ( int j = 0 ; j < ncols ; j ++ ) { double val = a . getDouble ( ima . set ( i , j ) ) * diag . getDouble ( j ) ; a . setDouble ( ima , val ) ; } } }
Matrix multiply by a diagonal matrix, store result in this: this = this * diag
@param diag diagonal matrix stored as a Vector
@exception IllegalArgumentException if ncols != diag.getNelems().
Matrix multiply by a diagonal matrix store result in this : this = this * diag