Added ordering-less negate()
parent
0aa72c986e
commit
bac1faa68e
|
@ -141,6 +141,12 @@ GaussianFactor::shared_ptr LinearContainerFactor::negate(const Ordering& orderin
|
|||
return result;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
NonlinearFactor::shared_ptr LinearContainerFactor::negate() const {
|
||||
GaussianFactor::shared_ptr antifactor = factor_->negate(); // already has keys in place
|
||||
return NonlinearFactor::shared_ptr(new LinearContainerFactor(antifactor));
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
} // \namespace gtsam
|
||||
|
||||
|
|
|
@ -79,6 +79,14 @@ public:
|
|||
*/
|
||||
GaussianFactor::shared_ptr negate(const Ordering& ordering) const;
|
||||
|
||||
/**
|
||||
* Creates the equivalent anti-factor as another LinearContainerFactor,
|
||||
* so it remains independent of ordering.
|
||||
*/
|
||||
NonlinearFactor::shared_ptr negate() const;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Creates a shared_ptr clone of the factor - needs to be specialized to allow
|
||||
* for subclasses
|
||||
|
|
Loading…
Reference in New Issue