Mutates this by multiplying each value by the value in b that has the same index. This method should be overloaded for a serious implementation. @param b the vector to pairwise multiply by
(Vec b)
| 366 | * @param b the vector to pairwise multiply by |
| 367 | */ |
| 368 | public void mutablePairwiseMultiply(Vec b) |
| 369 | { |
| 370 | if(length() != b.length()) |
| 371 | throw new ArithmeticException("Vector lengths do not agree " + length() + " vs " + b.length()); |
| 372 | for(int i = 0; i < length(); i++) |
| 373 | set(i, get(i)*b.get(i)); |
| 374 | } |
| 375 | |
| 376 | /** |
| 377 | * Mutates {@code this *= c} |