Added dims function so that TupleConfig1 works

release/4.3a0
Alex Cunningham 2010-11-06 17:48:43 +00:00
parent 15310ed6ad
commit d20118abbc
1 changed files with 7 additions and 0 deletions

View File

@ -346,6 +346,13 @@ namespace gtsam {
first_.apply(operation);
}
/** Create an array of variable dimensions using the given ordering */
std::vector<size_t> dims(const Ordering& ordering) const {
_ValuesDimensionCollector dimCollector(ordering);
this->apply(dimCollector);
return dimCollector.dimensions;
}
/**
* Generate a default ordering, simply in key sort order. To instead
* create a fill-reducing ordering, use