fix he degree ordering routine

This commit is contained in:
Sameer Agarwal
2012-05-06 15:14:47 -07:00
parent f7898fba1b
commit 887b156b91
+3
View File
@@ -49,6 +49,9 @@ class VertexDegreeLessThan {
: graph_(graph) {}
bool operator()(const Vertex& lhs, const Vertex& rhs) const {
if (graph_.Neighbors(lhs).size() == graph_.Neighbors(rhs).size()) {
return lhs->user_state() < rhs->user_state();
}
return (graph_.Neighbors(lhs).size() < graph_.Neighbors(rhs).size());
}