Typedef mola::Factor
Defined in File Factor.h
Typedef Documentation
-
using mola::Factor = std::variant<std::monostate, FactorRelativePose3, FactorDynamicsConstVel, FactorStereoProjectionPose, SmartFactorStereoProjectionPose, SmartFactorIMU, FactorOther>
Variant type for “factors” in the world model. It’s guaranteed that the type is either:
std::monostate
: Not initialized, orA class derived from
FactorBase
(stored by value), orFactorOther
, which is a wrapper aroundFactorBase::Ptr
(an object allocated in the heap).
In this way,
Factor
can be handled as a polymorphic class, without the cost of dynamic memory allocation for the most-common classes, while still allowing using any user-derived class via dynamic memory.