27 #include <boost/tuple/tuple.hpp> 57 GTSAM_EXPORT
static const size_t Empty;
76 GTSAM_EXPORT
void print(
const std::string&
str =
"VariableSlots: ")
const;
91 gttic(VariableSlots_constructor);
92 static const bool debug =
false;
100 size_t jointFactorPos = 0;
101 for(
const typename FG::sharedFactor& factor: factorGraph) {
105 size_t factorVarSlot = 0;
106 for(
const Key involvedVariable: *factor) {
113 iterator thisVarSlots;
bool inserted;
116 thisVarSlots->second.resize(factorGraph.nrFactors(),
Empty);
117 thisVarSlots->second[jointFactorPos] = factorVarSlot;
118 if(debug) std::cout <<
" var " << involvedVariable <<
" rowblock " << jointFactorPos <<
" comes from factor's slot " << factorVarSlot << std::endl;
Concept check for values that can be used in unit tests.
Included from all GTSAM files.
FastMap< Key, FastVector< size_t > > Base
static GTSAM_EXPORT const size_t Empty
VariableSlots(const FG &factorGraph)
A thin wrapper around std::vector that uses a custom allocator.
A thin wrapper around std::map that uses boost's fast_pool_allocator.
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
GTSAM_EXPORT void print(const std::string &str="VariableSlots: ") const
std::uint64_t Key
Integer nonlinear key type.
GTSAM_EXPORT bool equals(const VariableSlots &rhs, double tol=0.0) const