Small bug-fixes for managing linearization points
parent
bd6cb53d5e
commit
d8e0a95890
|
@ -205,7 +205,7 @@ GaussianFactor::shared_ptr LinearContainerFactor::negate(const Ordering& orderin
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
NonlinearFactor::shared_ptr LinearContainerFactor::negate() const {
|
NonlinearFactor::shared_ptr LinearContainerFactor::negate() const {
|
||||||
GaussianFactor::shared_ptr antifactor = factor_->negate(); // already has keys in place
|
GaussianFactor::shared_ptr antifactor = factor_->negate(); // already has keys in place
|
||||||
return NonlinearFactor::shared_ptr(new LinearContainerFactor(antifactor));
|
return NonlinearFactor::shared_ptr(new LinearContainerFactor(antifactor,linearizationPoint_));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
|
@ -23,6 +23,11 @@ protected:
|
||||||
GaussianFactor::shared_ptr factor_;
|
GaussianFactor::shared_ptr factor_;
|
||||||
boost::optional<Values> linearizationPoint_;
|
boost::optional<Values> linearizationPoint_;
|
||||||
|
|
||||||
|
/** direct copy constructor */
|
||||||
|
LinearContainerFactor(const GaussianFactor::shared_ptr& factor,
|
||||||
|
const boost::optional<Values>& linearizationPoint)
|
||||||
|
: factor_(factor), linearizationPoint_(linearizationPoint) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** Primary constructor: store a linear factor and decode the ordering */
|
/** Primary constructor: store a linear factor and decode the ordering */
|
||||||
|
@ -105,7 +110,7 @@ public:
|
||||||
* Clones the underlying linear factor
|
* Clones the underlying linear factor
|
||||||
*/
|
*/
|
||||||
NonlinearFactor::shared_ptr clone() const {
|
NonlinearFactor::shared_ptr clone() const {
|
||||||
return NonlinearFactor::shared_ptr(new LinearContainerFactor(factor_));
|
return NonlinearFactor::shared_ptr(new LinearContainerFactor(factor_,linearizationPoint_));
|
||||||
}
|
}
|
||||||
|
|
||||||
// casting syntactic sugar
|
// casting syntactic sugar
|
||||||
|
|
Loading…
Reference in New Issue