Returns an appropriate matrix to use for some operation A op B, where A = this @param B the other matrix, may be null @return a matrix that can be mutated to take the place of A
(Matrix B)
| 148 | * @return a matrix that can be mutated to take the place of A |
| 149 | */ |
| 150 | private Matrix getThisSideMatrix(Matrix B) |
| 151 | { |
| 152 | if(this.canBeMutated()) |
| 153 | return this.clone(); |
| 154 | else//so far, only other option in JSAT is a dense matrix |
| 155 | { |
| 156 | DenseMatrix dm = new DenseMatrix(rows(), cols()); |
| 157 | dm.mutableAdd(this); |
| 158 | return dm; |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | * Creates a new Matrix that stores the result of <i>A-B</i> |
no test coverage detected