56 GTSAM_EXPORT
static const size_t Empty;
75 GTSAM_EXPORT
void print(
const std::string&
str =
"VariableSlots: ")
const;
90 gttic(VariableSlots_constructor);
91 static const bool debug =
false;
99 size_t jointFactorPos = 0;
100 for(
const typename FG::sharedFactor& factor: factorGraph) {
104 size_t factorVarSlot = 0;
105 for(
const Key involvedVariable: *factor) {
114 thisVarSlots->second.resize(factorGraph.nrFactors(),
Empty);
115 thisVarSlots->second[jointFactorPos] = factorVarSlot;
116 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.
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
static constexpr bool debug
GTSAM_EXPORT bool equals(const VariableSlots &rhs, double tol=0.0) const
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.
GTSAM_EXPORT void print(const std::string &str="VariableSlots: ") const
std::uint64_t Key
Integer nonlinear key type.