diff --git a/cpp/FactorGraph-inl.h b/cpp/FactorGraph-inl.h index 37ddaab59..1fe935720 100644 --- a/cpp/FactorGraph-inl.h +++ b/cpp/FactorGraph-inl.h @@ -6,6 +6,7 @@ * @author Carlos Nieto * @author Frank Dellaert * @author Alireza Fathi + * @author Michael Kaess */ #pragma once @@ -189,7 +190,6 @@ void colamd(int n_col, int n_row, int nrNonZeros, const map >& // Convert to compressed column major format colamd wants it in (== MATLAB format!) vector initialOrder; -// int Alen = nrNonZeros*30; /* colamd arg 3: size of the array A TODO: use Tim's function ! */ int Alen = ccolamd_recommended(nrNonZeros, n_row, n_col); /* colamd arg 3: size of the array A */ int * A = new int[Alen]; /* colamd arg 4: row indices of A, of size Alen */ int * p = new int[n_col + 1]; /* colamd arg 5: column pointers of A, of size n_col+1 */ @@ -224,11 +224,7 @@ void colamd(int n_col, int n_row, int nrNonZeros, const map >& // call colamd, result will be in p ************************************************* /* TODO: returns (1) if successful, (0) otherwise*/ -#if 0 - ::colamd(n_row, n_col, Alen, A, p, knobs, stats); -#else ::ccolamd(n_row, n_col, Alen, A, p, knobs, stats, cmember); -#endif // ********************************************************************************** delete [] A; // delete symbolic A delete [] cmember; diff --git a/cpp/FactorGraph.h b/cpp/FactorGraph.h index 85f64a3b6..90fba540f 100644 --- a/cpp/FactorGraph.h +++ b/cpp/FactorGraph.h @@ -3,6 +3,7 @@ * @brief Factor Graph Base Class * @author Carlos Nieto * @author Christian Potthast + * @author Michael Kaess */ // \callgraph @@ -104,7 +105,7 @@ namespace gtsam { std::pair, std::set > removeSingletons(); /** - * Compute colamd ordering, including I/O and shared pointer version + * Compute colamd ordering, including I/O, constrained ordering, and shared pointer version */ void getOrdering(Ordering& ordering, const std::set& lastKeys, boost::optional&> interested = boost::none) const; Ordering getOrdering() const; diff --git a/cpp/testGaussianFactorGraph.cpp b/cpp/testGaussianFactorGraph.cpp index 8a8086869..54a139191 100644 --- a/cpp/testGaussianFactorGraph.cpp +++ b/cpp/testGaussianFactorGraph.cpp @@ -441,7 +441,7 @@ TEST( GaussianFactorGraph, CONSTRUCTOR_GaussianBayesNet ) TEST( GaussianFactorGraph, getOrdering) { Ordering expected; - expected += "l1","x1","x2"; + expected += "l1","x2","x1"; GaussianFactorGraph fg = createGaussianFactorGraph(); Ordering actual = fg.getOrdering(); CHECK(assert_equal(expected,actual));