29 && this->index_ == other.
index_;
35 cout <<
"nEntries = " << nEntries() <<
", nFactors = " << nFactors() <<
"\n";
36 for(KeyMap::value_type key_factors: index_) {
37 cout <<
"var " << keyFormatter(key_factors.first) <<
":";
38 for(
const auto index: key_factors.second)
47 os <<
size() <<
" " << nFactors() <<
"\n";
49 for(KeyMap::value_type key_factors: index_) {
51 for(
const auto index: key_factors.second)
52 os << (index+1) <<
" ";
61 gttic(VariableIndex_augmentExistingFactor);
63 for(
const Key key: newKeys) {
64 index_[
key].push_back(factorIndex);
68 gttoc(VariableIndex_augmentExistingFactor);
const gtsam::Symbol key('X', 0)
void outputMetisFormat(std::ostream &os) const
void augmentExistingFactor(const FactorIndex factorIndex, const KeySet &newKeys)
bool equals(const VariableIndex &other, double tol=0.0) const
Test for equality (for unit tests and debug assertions).
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
ofstream os("timeSchurFactors.csv")
void print(const std::string &str="VariableIndex: ", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
Print the variable index (for unit tests and debugging).
std::uint64_t FactorIndex
Integer nonlinear factor index type.
std::uint64_t Key
Integer nonlinear key type.