koblas

scaleColumns

Scale column j by d(j) in place for dense or sparse storage: the product A * D.

scaleRows

Scale row i by d(i) in place for dense or sparse storage: the product D * A.

zeroStrictUpper

Zero the strict upper triangle in place, leaving the diagonal and everything below it untouched.

This is useful when only the lower triangle of a symmetric matrix should remain authoritative before the matrix is compared, hashed, or serialized.

Each column's strict upper entries are contiguous in column-major storage, so this is one fill per column rather than an indexed walk. In a matrix wider than it is tall, every column past the last row lies entirely above the diagonal and is zeroed whole.