fixed a bug in colamdOrdering

release/4.3a0
Kai Ni 2010-12-10 07:38:05 +00:00
parent 0b11a02183
commit 7a59d3cfe0
1 changed files with 2 additions and 0 deletions

View File

@ -80,6 +80,8 @@ void NonlinearFactorGraph<VALUES>::print(const std::string& str) const {
// Compute the VariableIndex (column-wise index)
VariableIndex variableIndex(*symbolic);
if(config.size() != variableIndex.size())
throw std::runtime_error("orderingCOLAMD: some variables in the graph are not constrained!");
// Compute a fill-reducing ordering with COLAMD
Permutation::shared_ptr colamdPerm(Inference::PermutationCOLAMD(variableIndex));