}
return r;
}
public AMatrix innerProduct(SparseColumnMatrix a) {
AMatrix r = Matrixx.createSparse(rows, a.cols);
for (int i = 0; i < rows; ++i) {
AVector row = unsafeGetVec(i);
if (! ((row == null) || (row.isZero()))) {
for (int j = 0; j < cols; ++j) {
AVector acol = a.unsafeGetVec(j);
double v = ((acol == null) || acol.isZero()) ? 0.0 : row.dotProduct(acol);
if (v!=0.0) r.unsafeSet(i, j, v);
}
}
}
return r;
}