Go to the documentation of this file.
24 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
25 #include <boost/serialization/nvp.hpp>
97 template<
typename CONTAINER>
102 template<
typename ITERATOR>
107 template<
typename CONTAINER>
113 template<
typename ITERATOR>
124 virtual ~
Factor() =
default;
130 bool empty()
const {
return keys_.empty(); }
159 size_t size()
const {
return keys_.size(); }
168 const std::string&
s =
"Factor",
172 virtual void printKeys(
173 const std::string&
s =
"Factor",
195 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
199 friend class boost::serialization::access;
200 template<
class Archive>
201 void serialize(Archive & ar,
const unsigned int ) {
202 ar & BOOST_SERIALIZATION_NVP(keys_);
static Factor FromIterators(ITERATOR first, ITERATOR last)
A thin wrapper around std::vector that uses a custom allocator.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Typedefs for easier changing of types.
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
const_iterator find(Key key) const
find
const KeyFormatter & formatter
bool empty() const
Whether the factor is empty (involves zero variables).
Key back() const
Last key.
const_iterator begin() const
static const symbolic::SymbolExpr< internal::symbolic_last_tag > last
std::shared_ptr< Factor > shared_ptr
A shared_ptr to this class.
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
void print(const Matrix &A, const string &s, ostream &stream)
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
KeyVector::iterator iterator
Iterator over keys.
const_iterator end() const
static Factor FromKeys(const CONTAINER &keys)
const gtsam::Symbol key('X', 0)
KeyVector::const_iterator const_iterator
Const iterator over keys.
KeyVector keys_
The keys involved in this factor.
Key front() const
First key.
FastSet< FactorIndex > FactorIndexSet
const KeyVector & keys() const
Access the factor's involved variable keys.
Factor(ITERATOR first, ITERATOR last)
Factor(const CONTAINER &keys)
static const EIGEN_DEPRECATED end_t end
std::uint64_t Key
Integer nonlinear key type.
FastVector< FactorIndex > FactorIndices
Define collection types:
gtsam
Author(s):
autogenerated on Thu Jun 13 2024 03:02:20