![]() |
Tulip
4.6.0
Better Visualization Through Research
|
00001 /* 00002 * 00003 * This file is part of Tulip (www.tulip-software.org) 00004 * 00005 * Authors: David Auber and the Tulip development Team 00006 * from LaBRI, University of Bordeaux 00007 * 00008 * Tulip is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation, either version 3 00011 * of the License, or (at your option) any later version. 00012 * 00013 * Tulip is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU General Public License for more details. 00017 * 00018 */ 00019 ///@cond DOXYGEN_HIDDEN 00020 00021 #ifndef DOXYGEN_NOTFOR_DEVEL 00022 #ifndef _TLPSTLFUNCTIONS_H 00023 #define _TLPSTLFUNCTIONS_H 00024 00025 namespace tlp { 00026 00027 class DoubleProperty; 00028 struct node; 00029 struct edge; 00030 /** 00031 This class enables to compare nodes and edges according to a metric, 00032 instances of this class are useful for using stl sort function. 00033 */ 00034 class LessByMetric { 00035 public: 00036 LessByMetric(DoubleProperty *metric):metric(metric) {} 00037 bool operator() (node n1,node n2); 00038 bool operator() (edge e1,edge e2); 00039 private: 00040 DoubleProperty *metric; 00041 }; 00042 00043 } 00044 #endif 00045 #endif // DOXYGEN_NOTFOR_DEVEL 00046 ///@endcond