|
|
| Ordering () |
| | Create an empty ordering.
|
|
template<typename KEYS> |
| | Ordering (const KEYS &keys) |
| | Create from a container.
|
|
This & | operator+= (Key key) |
| | Add new variables to the ordering as ordering += key1, key2, ....
|
|
This & | operator, (Key key) |
| | Overloading the comma operator allows for chaining appends.
|
| This & | operator+= (KeyVector &keys) |
| | Append new keys to the ordering as ordering += keys.
|
|
bool | contains (const Key &key) const |
| | Check if key exists in ordering.
|
| FastMap< Key, size_t > | invert () const |
| | Invert (not reverse) the ordering - returns a map from key to order position.
|
|
void | print (const std::string &str="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
|
bool | equals (const Ordering &other, double tol=1e-9) const |
|
| template<class FACTOR_GRAPH> |
| static Ordering | Colamd (const FACTOR_GRAPH &graph) |
| | Compute a fill-reducing ordering using COLAMD from a factor graph (see details for note on performance).
|
|
static Ordering | Colamd (const VariableIndex &variableIndex) |
| | Compute a fill-reducing ordering using COLAMD from a VariableIndex.
|
| template<class FACTOR_GRAPH> |
| static Ordering | ColamdConstrainedLast (const FACTOR_GRAPH &graph, const KeyVector &constrainLast, bool forceOrder=false) |
| | Compute a fill-reducing ordering using constrained COLAMD from a factor graph (see details for note on performance).
|
| static Ordering | ColamdConstrainedLast (const VariableIndex &variableIndex, const KeyVector &constrainLast, bool forceOrder=false) |
| | Compute a fill-reducing ordering using constrained COLAMD from a VariableIndex.
|
| template<class FACTOR_GRAPH> |
| static Ordering | ColamdConstrainedFirst (const FACTOR_GRAPH &graph, const KeyVector &constrainFirst, bool forceOrder=false) |
| | Compute a fill-reducing ordering using constrained COLAMD from a factor graph (see details for note on performance).
|
| static Ordering | ColamdConstrainedFirst (const VariableIndex &variableIndex, const KeyVector &constrainFirst, bool forceOrder=false) |
| | Compute a fill-reducing ordering using constrained COLAMD from a VariableIndex.
|
| template<class FACTOR_GRAPH> |
| static Ordering | ColamdConstrained (const FACTOR_GRAPH &graph, const FastMap< Key, int > &groups) |
| | Compute a fill-reducing ordering using constrained COLAMD from a factor graph (see details for note on performance).
|
| static Ordering | ColamdConstrained (const VariableIndex &variableIndex, const FastMap< Key, int > &groups) |
| | Compute a fill-reducing ordering using constrained COLAMD from a VariableIndex.
|
|
template<class FACTOR_GRAPH> |
| static Ordering | Natural (const FACTOR_GRAPH &fg) |
| | Return a natural Ordering. Typically used by iterative solvers.
|
|
template<class FACTOR_GRAPH> |
| static void | CSRFormat (std::vector< int > &xadj, std::vector< int > &adj, const FACTOR_GRAPH &graph) |
| | METIS Formatting function.
|
| static Ordering | Metis (const MetisIndex &met, int seed=4321) |
| | Compute an ordering determined by METIS from a VariableIndex.
|
|
template<class FACTOR_GRAPH> |
| static Ordering | Metis (const FACTOR_GRAPH &graph, int seed=4321) |
|
template<class FACTOR_GRAPH> |
| static Ordering | Create (OrderingType orderingType, const FACTOR_GRAPH &graph) |
template<class FACTOR_GRAPH>
| Ordering gtsam::Ordering::ColamdConstrained |
( |
const FACTOR_GRAPH & | graph, |
|
|
const FastMap< Key, int > & | groups ) |
|
inlinestatic |
Compute a fill-reducing ordering using constrained COLAMD from a factor graph (see details for note on performance).
This internally builds a VariableIndex so if you already have a VariableIndex, it is faster to use COLAMD(const VariableIndex&). In this function, a group for each variable should be specified in groups, and each group of variables will appear in the ordering in group index order. groups should be a map from Key to group index. The group indices used should be consecutive starting at 0, but may appear in groups in arbitrary order. Any variables not present in groups will be assigned to group 0. This function simply fills the cmember argument to CCOLAMD with the supplied indices, see the CCOLAMD documentation for more information.
Compute a fill-reducing ordering using constrained COLAMD from a VariableIndex.
In this function, a group for each variable should be specified in groups, and each group of variables will appear in the ordering in group index order. groups should be a map from Key to group index. The group indices used should be consecutive starting at 0, but may appear in groups in arbitrary order. Any variables not present in groups will be assigned to group 0. This function simply fills the cmember argument to CCOLAMD with the supplied indices, see the CCOLAMD documentation for more information.
template<class FACTOR_GRAPH>
| Ordering gtsam::Ordering::ColamdConstrainedFirst |
( |
const FACTOR_GRAPH & | graph, |
|
|
const KeyVector & | constrainFirst, |
|
|
bool | forceOrder = false ) |
|
inlinestatic |
Compute a fill-reducing ordering using constrained COLAMD from a factor graph (see details for note on performance).
This internally builds a VariableIndex so if you already have a VariableIndex, it is faster to use COLAMD(const VariableIndex&). This function constrains the variables in constrainLast to the end of the ordering, and orders all other variables before in a fill-reducing ordering. If forceOrder is true, the variables in constrainFirst will be ordered in the same order specified in the KeyVector constrainFirst. If forceOrder is false, the variables in constrainFirst will be ordered before all the others, but will be rearranged by CCOLAMD to reduce fill-in as well.
template<class FACTOR_GRAPH>
| Ordering gtsam::Ordering::ColamdConstrainedLast |
( |
const FACTOR_GRAPH & | graph, |
|
|
const KeyVector & | constrainLast, |
|
|
bool | forceOrder = false ) |
|
inlinestatic |
Compute a fill-reducing ordering using constrained COLAMD from a factor graph (see details for note on performance).
This internally builds a VariableIndex so if you already have a VariableIndex, it is faster to use COLAMD(const VariableIndex&). This function constrains the variables in constrainLast to the end of the ordering, and orders all other variables before in a fill-reducing ordering. If forceOrder is true, the variables in constrainLast will be ordered in the same order specified in the KeyVector constrainLast. If forceOrder is false, the variables in constrainLast will be ordered after all the others, but will be rearranged by CCOLAMD to reduce fill-in as well.
Compute an ordering determined by METIS from a VariableIndex.
METIS's nested dissection is randomized: seed initializes METIS's internal generator, which drives its initial bisections, matching order, and refinement tie-breaks. The default 4321 is the value METIS itself uses when no seed is supplied, so it reproduces the historical ordering exactly; other seeds draw different orderings, and keeping the best of k seeds (by fill or maximum clique) is a cheap quality boost.