diff --git a/cpp/FactorGraph-inl.h b/cpp/FactorGraph-inl.h index f58b7f981..b7163d65f 100644 --- a/cpp/FactorGraph-inl.h +++ b/cpp/FactorGraph-inl.h @@ -201,7 +201,7 @@ void FactorGraph::getOrdering(Ordering& ordering) const{ } int n_col = (int)(columns.size()); /* colamd arg 2: number of columns in A */ if(n_col != 0) - return colamd(n_col, n_row, nrNonZeros, columns, ordering); + colamd(n_col, n_row, nrNonZeros, columns, ordering); } @@ -210,6 +210,7 @@ template boost::shared_ptr FactorGraph::getOrdering_() const{ boost::shared_ptr ordering(new Ordering); getOrdering(*ordering); + return ordering; } /* ************************************************************************* */