#include <gugr_basics.h>
Public Methods | |
| bool | AppendLeft (const graph_vertex &v1, const graph_vertex &v2) |
| bool | AppendRight (const graph_vertex &v1, const graph_vertex &v2) |
Public Attributes | |
| graph_vertex_list2 | Vl |
| graph_vertex_list2 | Vr |
| graph_edge_list | E |
|
||||||||||||
|
Definition at line 131 of file gugr_basics.cpp.
00132 {
00133 graph_vertex *vl1,*vl2;
00134 graph_edge *e;
00135
00136 if( Vl.IsEmpty() )
00137 {
00138 vl2 = new graph_vertex(v2.v,NULL,v2.reserved[1]);
00139 Vl.AppendLeft(vl2);
00140 }
00141 else
00142 vl2 = Vl.head;
00143
00144 e = new graph_edge();
00145 E.Append(e);
00146
00147 vl1 = new graph_vertex(v1.v,e,v1.reserved[1]);
00148 Vl.AppendLeft(vl1);
00149
00150 e->v[0] = vl1;
00151 e->v[1] = vl2;
00152 /* if v is endpoint of right chain: */
00153 if((!Vr.IsEmpty())&&(Vr.head->v == v1.v))
00154 return(true);
00155
00156 return(false);
00157 }
|
|
||||||||||||
|
Definition at line 163 of file gugr_basics.cpp. References E, gugr::graph_edge_list, gugr::graph_vertex_list, gul::ndebug, Vl, and Vr.
00164 {
00165 graph_vertex *vr1,*vr2;
00166 graph_edge *e;
00167
00168 if( Vr.IsEmpty() )
00169 {
00170 vr2 = new graph_vertex(v2.v,NULL,v2.reserved[1]);
00171 Vr.AppendLeft(vr2);
00172 }
00173 else
00174 vr2 = Vr.head;
00175
00176 e = new graph_edge();
00177 E.Append(e);
00178
00179 vr1 = new graph_vertex(v1.v,e,v1.reserved[1]);
00180 Vr.AppendLeft(vr1);
00181
00182 e->v[0] = vr1;
00183 e->v[1] = vr2;
00184
00185 if((!Vl.IsEmpty())&&(Vl.head->v == v1.v)) /*if v is endpoint of left chain*/
00186 return(true);
00187
00188 return(false);
00189 }
|
|
|
Definition at line 448 of file gugr_basics.h. Referenced by AppendLeft(), and AppendRight(). |
|
|
Definition at line 446 of file gugr_basics.h. Referenced by AppendLeft(), and AppendRight(). |
|
|
Definition at line 447 of file gugr_basics.h. Referenced by AppendLeft(), and AppendRight(). |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001