Fix recalculate batch step when variables removed
Enrique Fernández Perdomo
Branch: enriquefernandezperdomo/gtsam:fix_recalculate_batch_step_when_variables_removed_onto_develop_04_aug_2016
Branch: gtborg/gtsam:develop
Merged
Merged pull request
Merged in enriquefernandezperdomo/gtsam/fix_recalculate_batch_step_when_variables_removed_onto_develop_04_aug_2016 (pull request #272)
Fix CCOLAMD base cases for 0 and 1 variables
In both cases there's no need to find out any ordering at all: - For 0 variables, an empty Ordering is returned. - For 1 variable, an Ordering with that 1 variable is returned.
Remove unused indices in batch step
In the batch step (in recalculate) we need to remove the unused indices from the variable index, otherwise the elimination would throw an exception saying:
"Requested to eliminate a key that is not in the factors"