Example #1
0
 @Override
 public void transform(Vector source, Vector dest) {
   int rc = rowCount();
   int cc = rc;
   if (source.length() != cc)
     throw new IllegalArgumentException(ErrorMessages.wrongSourceLength(source));
   if (dest.length() != rc)
     throw new IllegalArgumentException(ErrorMessages.wrongDestLength(dest));
   double[] sdata = source.getArray();
   double[] ddata = dest.getArray();
   for (int row = 0; row < rc; row++) {
     ddata[row] = sdata[row] * unsafeGetDiagonalValue(row);
   }
 }