return not (a == b);
}
+bool operator<(const ConservedPath& a, const ConservedPath &b)
+{
+ ConservedPath::const_iterator a_i = a.begin();
+ ConservedPath::const_iterator b_i = b.begin();
+ for(; a_i != a.end() and b_i != b.end(); ++a_i, ++b_i)
+ {
+ if (*a_i < *b_i) {
+ return true;
+ } else if (*a_i > *b_i) {
+ return false;
+ }
+ // else they're equal and we continue to loop
+ }
+ // now handle mismatched lengths
+ if (a_i == a.end() and b_i == b.end()) {
+ return false; // since the two paths are equal
+ } else if (a_i == a.end()) {
+ return true; // a is shorter than b
+ } else if (b_i == b.end()) {
+ return false; // b is shorter than a
+ } else {
+ // something went horribly wrong
+ throw std::runtime_error("ConservedPath operator< had a fatal logic error");
+ }
+}
+
std::ostream& operator<<(std::ostream& out, const ConservedPath& path)
{
out << "<path win_size" << path.window_size