Go to the documentation of this file.
24 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
25 #include <boost/serialization/nvp.hpp>
98 template<
typename CONTAINER>
103 template<
typename ITERATOR>
108 template<
typename CONTAINER>
114 template<
typename ITERATOR>
125 virtual ~
Factor() =
default;
131 bool empty()
const {
return keys_.empty(); }
160 size_t size()
const {
return keys_.size(); }
169 const std::string&
s =
"Factor",
173 virtual void printKeys(
174 const std::string&
s =
"Factor",
196 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
200 friend class boost::serialization::access;
201 template<
class Archive>
202 void serialize(Archive & ar,
const unsigned int ) {
203 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 Sat Nov 16 2024 04:02:17