Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

IndexComparer.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/comparer.h>
35 
36 namespace ogdf {
37 
43 template<typename T>
45 {
46 public:
48  {
49  }
50 
51  int compare(const T &a, const T &b) const
52  {
53  return a->index() - b->index();
54  }
55 
57 };
58 
59 }
Declarations for Comparer objects.
#define OGDF_AUGMENT_COMPARER(type)
Add this macro to your class to turn it into a full comparer.
Definition: comparer.h:155
int compare(const T &a, const T &b) const
Definition: IndexComparer.h:51
The IndexComparer compares entities like nodes, edges, adjacency entries, based on their index...
Definition: IndexComparer.h:44
The namespace for all OGDF objects.