54 bool isDiscrete_ =
false;
55 bool isContinuous_ =
false;
56 bool isHybrid_ =
false;
67 typedef std::shared_ptr<HybridFactor>
109 const std::string &
s =
"HybridFactor\n",
137 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 139 friend class boost::serialization::access;
140 template <
class ARCHIVE>
141 void serialize(ARCHIVE &ar,
const unsigned int ) {
142 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
143 ar &BOOST_SERIALIZATION_NVP(isDiscrete_);
144 ar &BOOST_SERIALIZATION_NVP(isContinuous_);
145 ar &BOOST_SERIALIZATION_NVP(isHybrid_);
146 ar &BOOST_SERIALIZATION_NVP(discreteKeys_);
147 ar &BOOST_SERIALIZATION_NVP(continuousKeys_);
void print(const Matrix &A, const string &s, ostream &stream)
Decision Tree for use in DiscreteFactors.
Concept check for values that can be used in unit tests.
A non-templated config holding any types of Manifold-group elements.
std::string serialize(const T &input)
serializes to a string
const DiscreteKeys & discreteKeys() const
Return the discrete keys for this factor.
const KeyVector & continuousKeys() const
Return only the continuous keys for this factor.
HybridFactor This
This class.
static const KeyFormatter DefaultKeyFormatter
Factor Base
Our base class.
const KeyFormatter & formatter
std::shared_ptr< HybridFactor > shared_ptr
shared_ptr to this class
size_t nrContinuous() const
Return the number of continuous variables in this factor.
const Symbol key1('v', 1)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Linear Factor Graph where all factors are Gaussians.
bool isContinuous() const
True if this is a factor of continuous variables only.
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
KeyVector continuousKeys_
Record continuous keys for book-keeping.
specialized key for discrete variables
bool isHybrid() const
True is this is a Discrete-Continuous factor.
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
DiscreteKeys discreteKeys_
bool isDiscrete() const
True if this is a factor of discrete variables only.
DiscreteKeys CollectDiscreteKeys(const DiscreteKeys &key1, const DiscreteKeys &key2)
KeyVector CollectKeys(const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys)
const Symbol key2('v', 2)
The base class for all factors.
DiscreteKeys is a set of keys that can be assembled using the & operator.