fix(math): preserve certified sums and complete MKL algebra

This commit is contained in:
KOKO\Mimi
2026-10-14 15:40:52 +09:00
parent 59c8e93b07
commit 590a93793f
9 changed files with 236 additions and 95 deletions
+4
View File
@@ -211,6 +211,10 @@ Vector SparseMatrix::Multiply(const Vector& rhs) const {
if (!Validate().IsOk()) {
throw std::invalid_argument{"Sparse multiplication requires valid CSR."};
}
for (std::size_t i = 0; i < rhs.Size(); ++i) {
if (!std::isfinite(rhs[i]))
throw std::invalid_argument{"Sparse multiplication RHS must be finite."};
}
const MKL_INT rows = SparseSize(rows_);
const MKL_INT columns = SparseSize(columns_);
static_cast<void>(SparseSize(values_.size()));