Reverted interface changes that are unnecessary to make the code compile

release/4.3a0
Tyler Veness 2025-01-10 15:36:09 -08:00
parent a0ae31f0d4
commit 5a44974785
No known key found for this signature in database
GPG Key ID: AA007082A8B65599
3 changed files with 22 additions and 0 deletions

View File

@ -149,6 +149,20 @@ void SubgraphPreconditioner::multiplyInPlace(const VectorValues& y, Errors& e) c
Ab2_.multiplyInPlace(x, ei); // use iterator version
}
/* ************************************************************************* */
// Apply operator A', A'*e = [I inv(R1')*A2']*e = e1 + inv(R1')*A2'*e2
VectorValues SubgraphPreconditioner::operator^(const Errors& e) const {
Errors::const_iterator it = e.begin();
VectorValues y = zero();
for(auto& key_value: y) {
key_value.second = *it;
++it;
}
transposeMultiplyAdd2(1.0, it, e.end(), y);
return y;
}
/* ************************************************************************* */
// y += alpha*A'*e
void SubgraphPreconditioner::transposeMultiplyAdd

View File

@ -125,6 +125,9 @@ namespace gtsam {
/** Apply operator A in place: needs e allocated already */
void multiplyInPlace(const VectorValues& y, Errors& e) const;
/** Apply operator A' */
VectorValues operator^(const Errors& e) const;
/**
* Add A'*e to y
* y += alpha*A'*[e1;e2] = [alpha*e1; alpha*inv(R1')*A2'*e2]

View File

@ -59,6 +59,11 @@ namespace gtsam {
/** Access b vector */
const Vector& b() const { return b_; }
/** Apply operator A'*e */
Vector operator^(const Vector& e) const {
return A_.transpose() * e;
}
/**
* Print with optional string
*/