add GTSAM_NO_ENFORCE_ORDERING flag

release/4.3a0
Kai Ni 2011-03-12 10:57:03 +00:00
parent 9a9b642d5d
commit 38b89db219
1 changed files with 3 additions and 1 deletions

View File

@ -32,9 +32,11 @@ template class Factor<Index>;
void IndexFactor::assertInvariants() const {
Base::assertInvariants();
#ifndef NDEBUG
#ifndef GTSAM_NO_ENFORCE_ORDERING
std::set<Index> uniqueSorted(keys_.begin(), keys_.end());
assert(uniqueSorted.size() == keys_.size() && std::equal(uniqueSorted.begin(), uniqueSorted.end(), keys_.begin()));
#endif
#endif
}
/* ************************************************************************* */