24 #include <boost/shared_ptr.hpp> 25 #include <boost/assign/list_of.hpp> 26 #include <boost/make_shared.hpp> 33 class SymbolicConditional;
58 Base(
boost::assign::cref_list_of<1>(j)) {}
62 Base(
boost::assign::cref_list_of<2>(j1)(j2)) {}
66 Base(
boost::assign::cref_list_of<3>(j1)(j2)(j3)) {}
70 Base(
boost::assign::cref_list_of<4>(j1)(j2)(j3)(j4)) {}
74 Base(
boost::assign::cref_list_of<5>(j1)(j2)(j3)(j4)(j5)) {}
78 Base(
boost::assign::cref_list_of<6>(j1)(j2)(j3)(j4)(j5)(j6)) {}
93 bool equals(
const This& other,
double tol = 1
e-9)
const;
97 const std::string&
s =
"SymbolicFactor",
104 const std::string&
s =
"SymbolicFactor",
115 template<
typename KEYITERATOR>
121 template<
typename KEYITERATOR>
124 result->keys_.assign(beginKey, endKey);
130 template<
class CONTAINER>
137 template<
class CONTAINER>
139 return FromIteratorsShared(keys.begin(), keys.end());
148 bool empty()
const {
return keys_.empty(); }
152 std::pair<boost::shared_ptr<SymbolicConditional>, boost::shared_ptr<SymbolicFactor> >
159 friend class boost::serialization::access;
160 template<
class ARCHIVE>
162 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
174 GTSAM_EXPORT std::pair<boost::shared_ptr<SymbolicConditional>, boost::shared_ptr<SymbolicFactor> >
void print(const Matrix &A, const string &s, ostream &stream)
void printKeys(const std::string &s="SymbolicFactor", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print only keys
SymbolicFactor(Key j1, Key j2, Key j3, Key j4)
Concept check for values that can be used in unit tests.
SymbolicConditional ConditionalType
static SymbolicFactor::shared_ptr FromKeysShared(const CONTAINER &keys)
GaussianFactorGraph factors(list_of(factor1)(factor2)(factor3))
SymbolicFactor(Key j1, Key j2, Key j3)
void print(const std::string &s="SymbolicFactor", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print
static const KeyFormatter DefaultKeyFormatter
SymbolicFactor(Key j1, Key j2)
static SymbolicFactor::shared_ptr FromIteratorsShared(KEYITERATOR beginKey, KEYITERATOR endKey)
const KeyFormatter & formatter
void serialize(ARCHIVE &ar, const unsigned int)
SymbolicFactor(const Factor &factor)
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
boost::shared_ptr< This > shared_ptr
Array< double, 1, 3 > e(1./3., 0.5, 2.)
SymbolicFactor(Key j1, Key j2, Key j3, Key j4, Key j5, Key j6)
static SymbolicFactor FromKeys(const CONTAINER &keys)
SymbolicFactor::shared_ptr clone() const
Copy this object as its actual derived type.
static SymbolicFactor FromIterators(KEYITERATOR beginKey, KEYITERATOR endKey)
virtual ~SymbolicFactor()
std::pair< boost::shared_ptr< SymbolicConditional >, boost::shared_ptr< SymbolicFactor > > EliminateSymbolic(const SymbolicFactorGraph &factors, const Ordering &keys)
std::uint64_t Key
Integer nonlinear key type.
SymbolicFactor(Key j1, Key j2, Key j3, Key j4, Key j5)
The base class for all factors.