Using granular debugging flags, fixed code comment

release/4.3a0
Richard Roberts 2011-02-04 02:36:14 +00:00
parent 161058e402
commit 689adead55
2 changed files with 5 additions and 4 deletions

View File

@ -16,6 +16,7 @@
* @created Dec 8, 2010
*/
#include <gtsam/base/debug.h>
#include <gtsam/base/timing.h>
#include <gtsam/base/Matrix.h>
#include <gtsam/base/FastMap.h>
@ -242,7 +243,7 @@ namespace gtsam {
void JacobianFactor::permuteWithInverse(const Permutation& inversePermutation) {
// Build a map from the new variable indices to the old slot positions.
typedef map<size_t, size_t, std::less<size_t>, boost::fast_pool_allocator<std::pair<const size_t, size_t> > > SourceSlots;
typedef FastMap<size_t, size_t> SourceSlots;
SourceSlots sourceSlots;
for(size_t j=0; j<keys_.size(); ++j)
sourceSlots.insert(make_pair(inversePermutation[keys_[j]], j));
@ -383,7 +384,7 @@ namespace gtsam {
assert(keys_.size() >= nrFrontals);
assertInvariants();
static const bool debug = false;
const bool debug = ISDEBUG("JacobianFactor::eliminate");
if(debug) cout << "Eliminating " << nrFrontals << " frontal variables" << endl;
if(debug) this->print("Eliminating JacobianFactor: ");
@ -553,7 +554,7 @@ namespace gtsam {
/* ************************************************************************* */
JacobianFactor::shared_ptr JacobianFactor::Combine(const FactorGraph<JacobianFactor>& factors, const VariableSlots& variableSlots) {
static const bool debug = false;
const bool debug = ISDEBUG("JacobianFactor::Combine");
if(debug) factors.print("Combining factors: ");

View File

@ -126,7 +126,7 @@ namespace gtsam {
virtual void permuteWithInverse(const Permutation& inversePermutation);
/**
* return the number of rows in the corresponding linear system
* return the number of columns in the corresponding linear system
*/
size_t size1() const { return Ab_.size1(); }