Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

gugr::dump_graph Class Reference

#include <gugr_io.h>

List of all members.

Public Methods

 dump_graph (graph_vertex_list *V, graph_edge_list *E)
void dump_vertice (graph_vertex *v, std::ostream &s)
void dump_vertices (graph_vertex *V, std::ostream &s)
void dump_edges (graph_edge *E, std::ostream &s)

Public Attributes

gul::poolmap< graph_vertex *,
int > 
m_V
int m_nV
gul::poolmap< graph_edge *,
int > 
m_E
int m_nE
graph_vertex_listm_VL
graph_edge_listm_EL


Constructor & Destructor Documentation

gugr::dump_graph::dump_graph graph_vertex_list   V,
graph_edge_list   E
[inline]
 

Definition at line 177 of file gugr_io.h.

References gugr::graph_edge_list, gugr::graph_vertex_list, m_EL, m_nE, m_nV, and m_VL.

00178   {
00179     int i;
00180     graph_vertex *v = V->First();
00181     graph_edge   *e = E->First();
00182 
00183     m_VL = V;
00184     m_EL = E;
00185 
00186     // initialize pointer lookup tables
00187     i = 1;    
00188     while( v != NULL )
00189     {
00190       m_V[v] = i;
00191       i++;
00192       v = v->next;
00193     }
00194     m_nV = i;
00195 
00196     i = 1;    
00197     while( e != NULL )
00198     {
00199       m_E[e] = i;
00200       i++;
00201       e = e->next;
00202     }
00203     m_nE = i;
00204   };


Member Function Documentation

void gugr::dump_graph::dump_edges graph_edge   E,
std::ostream &    s
[inline]
 

Definition at line 228 of file gugr_io.h.

00229   {
00230     graph_edge *e = E; 
00231 
00232     s << "EDGES\n";    
00233     while( e != NULL )
00234     {
00235       s << "E" << m_E[e] << ": [" << e->f[0].i << "," << e->f[1].i << "] ["
00236         << "V" << m_V[e->v[0]] << "=(" << e->v[0]->v.v() << "), " 
00237         << "E" << m_E[e->e[0]] << "]  ["
00238         << "V" << m_V[e->v[1]] << "=(" << e->v[1]->v.v() << "), " 
00239         << "E" << m_E[e->e[1]] << "]";                
00240       s << "\n";
00241       e = e->next;
00242     }
00243   }

void gugr::dump_graph::dump_vertice graph_vertex   v,
std::ostream &    s
[inline]
 

Definition at line 206 of file gugr_io.h.

00207   {
00208     if( v )
00209       s << "V" << m_V[v] << ": [(" << v->v.v() << "), " 
00210         << "E" << m_E[v->e] << "]\n";
00211     else
00212       s << "<NULL>\n";
00213   }

void gugr::dump_graph::dump_vertices graph_vertex   V,
std::ostream &    s
[inline]
 

Definition at line 215 of file gugr_io.h.

00216   {
00217     graph_vertex *v = V;
00218 
00219     s << "VERTICES\n";
00220     while( v != NULL )
00221     {
00222       s << "V" << m_V[v] << ": [(" << v->v.v() << "), " 
00223         << "E" << m_E[v->e] << "]\n";
00224       v = v->next;
00225     }
00226   }


Member Data Documentation

gul::poolmap<graph_edge*,int> gugr::dump_graph::m_E
 

Definition at line 170 of file gugr_io.h.

graph_edge_list* gugr::dump_graph::m_EL
 

Definition at line 173 of file gugr_io.h.

Referenced by dump_graph().

int gugr::dump_graph::m_nE
 

Definition at line 171 of file gugr_io.h.

Referenced by dump_graph().

int gugr::dump_graph::m_nV
 

Definition at line 169 of file gugr_io.h.

Referenced by dump_graph().

gul::poolmap<graph_vertex*,int> gugr::dump_graph::m_V
 

Definition at line 168 of file gugr_io.h.

graph_vertex_list* gugr::dump_graph::m_VL
 

Definition at line 172 of file gugr_io.h.

Referenced by dump_graph().


The documentation for this class was generated from the following file:
Generated on Mon Jan 21 04:17:54 2002 for GUL 0.6 - Geometry Utility Library by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001