More use of FastList, FastSet
parent
12664813d4
commit
5b3000fe0a
|
|
@ -84,8 +84,8 @@ namespace gtsam {
|
|||
|
||||
/* ************************************************************************* */
|
||||
template<class CONDITIONAL>
|
||||
list<Index> BayesNet<CONDITIONAL>::ordering() const {
|
||||
list<Index> ord;
|
||||
FastList<Index> BayesNet<CONDITIONAL>::ordering() const {
|
||||
FastList<Index> ord;
|
||||
BOOST_FOREACH(sharedConditional conditional,conditionals_)
|
||||
ord.push_back(conditional->key());
|
||||
return ord;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtsam/base/types.h>
|
||||
#include <gtsam/base/FastList.h>
|
||||
#include <gtsam/base/Testable.h>
|
||||
#include <gtsam/inference/Permutation.h>
|
||||
|
||||
|
|
@ -107,7 +108,7 @@ namespace gtsam {
|
|||
}
|
||||
|
||||
/** return keys in reverse topological sort order, i.e., elimination order */
|
||||
std::list<Index> ordering() const;
|
||||
FastList<Index> ordering() const;
|
||||
|
||||
/** SLOW O(n) random access to Conditional by key */
|
||||
sharedConditional operator[](Index key) const;
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ namespace gtsam {
|
|||
|
||||
if(bayesClique) {
|
||||
// create a new clique in the junction tree
|
||||
list<Index> frontals = bayesClique->ordering();
|
||||
FastList<Index> frontals = bayesClique->ordering();
|
||||
sharedClique clique(new Clique(frontals.begin(), frontals.end(), bayesClique->separator_.begin(), bayesClique->separator_.end()));
|
||||
|
||||
// count the factors for this cluster to pre-allocate space
|
||||
|
|
|
|||
|
|
@ -36,9 +36,6 @@ namespace gtsam {
|
|||
/* Static members only, private constructor */
|
||||
Inference() {}
|
||||
|
||||
// Internal version that actually calls colamd after the constraint set is created in the right format
|
||||
static Permutation::shared_ptr PermutationCOLAMD_(const VariableIndex& variableIndex, std::vector<int>& cmember);
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
|
|
@ -52,6 +49,11 @@ namespace gtsam {
|
|||
template<typename CONSTRAINED>
|
||||
static Permutation::shared_ptr PermutationCOLAMD(const VariableIndex& variableIndex, const CONSTRAINED& constrainLast);
|
||||
|
||||
/**
|
||||
* Compute a CCOLAMD permutation using the constraint groups in cmember.
|
||||
*/
|
||||
static Permutation::shared_ptr PermutationCOLAMD_(const VariableIndex& variableIndex, std::vector<int>& cmember);
|
||||
|
||||
};
|
||||
|
||||
/* ************************************************************************* */
|
||||
|
|
|
|||
Loading…
Reference in New Issue