MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / EdgeLess

Function EdgeLess

Algorithms/redcap.cpp:46–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44using namespace SpanningTreeClustering;
45
46bool EdgeLess(const Edge* a, const Edge* b)
47{
48 if (a->length < b->length) {
49 return true;
50 } else if (a->length > b->length ) {
51 return false;
52 } else if (a->orig->id < b->orig->id) {
53 return true;
54 } else if (a->orig->id > b->orig->id) {
55 return false;
56 } else if (a->dest->id < b->dest->id) {
57 return true;
58 } else if (a->dest->id > b->dest->id) {
59 return false;
60 }
61 return true;
62}
63
64/* This function takes last element as pivot, places
65the pivot element at its correct position in sorted

Callers 1

partitionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected