LinearOperator::FooMultiply -> LinearOperator::FooMultiplyAndAccumulate

These methods were historically poorly named and every time I read code
I get confused whether they are just multiplying or multiplying and
adding. Clarifying them also gives us the changce to introduce
RightMultiply and LeftMultiply methods in the base class which will
simplify a number call sites in a subsequent CL.

Fixes https://github.com/ceres-solver/ceres-solver/issues/855

Change-Id: Ice4fb483f1acd02527a6dd753ef0c5a66037f4b0
This commit is contained in:
Sameer Agarwal
2022-08-10 09:55:43 -07:00
parent 288a3fde6b
commit 04899645cc
55 changed files with 221 additions and 210 deletions
@@ -75,7 +75,7 @@ class CERES_NO_EXPORT BlockRandomAccessDiagonalMatrix
void Invert();
// y += S * x
void RightMultiply(const double* x, double* y) const;
void RightMultiplyAndAccumulate(const double* x, double* y) const;
// Since the matrix is square, num_rows() == num_cols().
int num_rows() const final { return tsm_->num_rows(); }