Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
components.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file components.cpp
1 /* This software is distributed under the GNU Lesser General Public License */
2 //==========================================================================
3 //
4 // components.cpp
5 //
6 //==========================================================================
7 // $Id: components.cpp,v 1.5 2001/11/07 13:58:09 pick Exp $
8 
9 #include <GTL/components.h>
10 
11 #ifdef __GTL_MSVCC
12 # ifdef _DEBUG
13 # ifndef SEARCH_MEMORY_LEAKS_ENABLED
14 # error SEARCH NOT ENABLED
15 # endif
16 # define new DEBUG_NEW
17 # undef THIS_FILE
18  static char THIS_FILE[] = __FILE__;
19 # endif // _DEBUG
20 #endif // __GTL_MSVCC
21 
23 
25 {
26  scan_whole_graph (true);
28 }
29 
31 {
32  dfs::reset ();
33  comp.erase (comp.begin(), comp.end());
35 }
36 
38 {
39  return G.is_undirected() && whole_graph &&
40  dfs::check (G) == GTL_OK ? GTL_OK : GTL_ERROR;
41 }
42 
43 
44 //--------------------------------------------------------------------------
45 // Handler
46 //--------------------------------------------------------------------------
47 
48 
50 {
51  li = comp.insert (comp.end(),
52  pair<list<node>,list<edge> > (list<node> (), list<edge> ()));
53  (*li).first.push_back (st);
55 }
56 
58 {
59  (*li).first.push_back (n);
60  // (*li).second.push_back (e);
61 }
62 
63 
65 {
66  node curr = n.opposite (e);
67 
68  //
69  // Store backedges at lower endpoint
70  //
71 
72  if (dfs_num (curr) > dfs_num (n)) {
73  (*li).second.push_back (e);
74  }
75 }
76 
77 
79 
80 //--------------------------------------------------------------------------
81 // end of file
82 //--------------------------------------------------------------------------