Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
min_tree.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file min_tree.h
1 /* This software is distributed under the GNU Lesser General Public License */
2 //==========================================================================
3 //
4 // min_tree.cpp
5 //
6 //==========================================================================
7 // $Id: min_tree.h,v 1.3 2001/06/21 10:55:08 chris Exp $
8 
9 #ifndef GTL_MIN_TREE_H
10 #define GTL_MIN_TREE_H
11 
12 #include <GTL/GTL.h>
13 #include <GTL/algorithm.h>
14 #include <GTL/edge_map.h>
15 #include <set>
16 
18 
25 class min_tree: public algorithm {
26 
27 public:
28 
32  min_tree ();
33 
37  virtual ~min_tree () {};
38 
54  int check (graph& g);
55 
56  int run (graph& g);
57 
58  virtual void reset ();
59 
68  void set_distances (const edge_map<int>& dist);
69 
77  set<edge> get_min_tree();
78 
84  int get_min_tree_length();
85 
86 private:
87  typedef pair<int, node::adj_edges_iterator> TSP_A_VALUE;
88 
89  class input_comp {
90  public:
92  { return x.first > y.first;}
93  };
94 
96  int weight;
97  set<edge> tree;
99 };
100 
102 
103 #endif // GTL_MIN_TREE_H
104 
105 
106 
107 
108