Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
embedding.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file embedding.h
1
/* This software is distributed under the GNU Lesser General Public License */
2
//==========================================================================
3
//
4
// embedding.h
5
//
6
//==========================================================================
7
// $Id: embedding.h,v 1.20 2003/06/11 11:28:21 raitner Exp $
8
9
#ifndef __EMBEDDING__H
10
#define __EMBEDDING__H
11
12
#include <
GTL/GTL.h
>
13
#include <
GTL/graph.h
>
14
#include <
GTL/st_number.h
>
15
#include <
GTL/symlist.h
>
16
17
__GTL_BEGIN_NAMESPACE
18
29
class
GTL_EXTERN
planar_embedding
30
{
31
public
:
35
typedef
symlist<edge>
adj_list
;
36
40
typedef
symlist<edge>::iterator
iterator
;
41
private
:
48
planar_embedding
() :
G
(0)
49
{
50
}
51
public
:
58
planar_embedding
(
const
planar_embedding
& em);
59
64
virtual
~
planar_embedding
()
65
{
66
}
67
77
planar_embedding
&
operator=
(
const
planar_embedding
& em);
78
private
:
85
void
init
(
graph
& G);
86
93
void
turn(
node
n
);
94
104
iterator push_back(
node
n
,
edge
e
);
105
115
iterator push_front(
node
n
,
edge
e
);
116
123
void
insert_selfloop (
edge
e
);
124
134
iterator&
pos
(
node
,
edge
);
135
public
:
144
adj_list
& adjacency(
node
n
)
145
{
146
return
adj[
n
];
147
}
148
157
const
adj_list
& adjacency(
node
n
)
const
158
{
159
return
adj[
n
];
160
}
161
170
iterator
adj_edges_begin(
node
n
)
171
{
172
return
adj[
n
].begin();
173
}
174
183
iterator
adj_edges_end(
node
n
)
184
{
185
return
adj[
n
].end();
186
}
187
198
edge
cyclic_next(
node
n
,
edge
e
);
199
210
edge
cyclic_prev(
node
n
,
edge
e
);
211
212
221
void
write_st(ostream&
os
,
st_number
& st);
222
230
list<edge>& selfloops()
231
{
232
return
self
;
233
}
234
242
const
list<edge>& selfloops()
const
243
{
244
return
self
;
245
}
246
257
list<edge>& multiple_edges()
258
{
259
return
multi;
260
}
261
272
const
list<edge>& multiple_edges()
const
273
{
274
return
multi;
275
}
276
287
bool
check
();
288
292
friend
class
planarity
;
293
297
friend
class
pq_tree
;
298
302
GTL_EXTERN
friend
ostream&
operator<<
(ostream&,
planar_embedding
&);
303
private
:
308
graph
*
G
;
309
314
node_map<adj_list>
adj
;
315
320
edge_map<adj_list::iterator>
s_pos
;
321
326
edge_map<adj_list::iterator>
t_pos
;
327
332
list<edge>
self
;
333
338
list<edge>
multi
;
339
};
340
341
342
// class face
343
// {
344
// public:
345
// face (planar_embedding& em, node n, edge e) : embed (em),
346
// start (n), first (e) { }
347
// virtual ~face () { }
348
349
// private:
350
// planar_embedding& embed;
351
// node start;
352
// edge first;
353
354
// friend class planar_embedding;
355
// };
356
357
// struct _face_iterator
358
// {
359
360
361
// face& _face;
362
// };
363
364
__GTL_END_NAMESPACE
365
366
#endif
367
368
//--------------------------------------------------------------------------
369
// end of file
370
//--------------------------------------------------------------------------
JETSCAPE
blob
main
external_packages
gtl
include
GTL
embedding.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:23
using
1.8.2 with
sPHENIX GitHub integration