Analysis Software
Documentation for sPHENIX simulation software
|
Ordered adjacency lists as a result of planarity testing. More...
#include <JETSCAPE/blob/main/external_packages/gtl/include/GTL/embedding.h>
Public Types | |
typedef symlist< edge > | adj_list |
typedef symlist< edge >::iterator | iterator |
Public Member Functions | |
planar_embedding (const planar_embedding &em) | |
virtual | ~planar_embedding () |
planar_embedding & | operator= (const planar_embedding &em) |
adj_list & | adjacency (node n) |
const adj_list & | adjacency (node n) const |
iterator | adj_edges_begin (node n) |
iterator | adj_edges_end (node n) |
edge | cyclic_next (node n, edge e) |
edge | cyclic_prev (node n, edge e) |
void | write_st (ostream &os, st_number &st) |
list< edge > & | selfloops () |
const list< edge > & | selfloops () const |
list< edge > & | multiple_edges () |
const list< edge > & | multiple_edges () const |
bool | check () |
Private Member Functions | |
planar_embedding () | |
void | init (graph &G) |
void | turn (node n) |
iterator | push_back (node n, edge e) |
iterator | push_front (node n, edge e) |
void | insert_selfloop (edge e) |
iterator & | pos (node, edge) |
Private Attributes | |
graph * | G |
node_map< adj_list > | adj |
edge_map< adj_list::iterator > | s_pos |
edge_map< adj_list::iterator > | t_pos |
list< edge > | self |
list< edge > | multi |
Friends | |
class | planarity |
class | pq_tree |
GTL_EXTERN friend ostream & | operator<< (ostream &, planar_embedding &) |
Ordered adjacency lists as a result of planarity testing.
It is known that if a graph is planar the adjacency list of every node can be ordered in such a way that it reflects the order the adjacent edges will have in a planar drawing around the node. Although the tested graph might have been directed the planar embedding one gets will always correspond to the underlying undirected graph, i.e. an edge from n1
to n2
will occurr in both adjacency lists.
Definition at line 29 of file embedding.h.
View newest version in sPHENIX GitHub at line 29 of file embedding.h
typedef symlist<edge> planar_embedding::adj_list |
Definition at line 35 of file embedding.h.
View newest version in sPHENIX GitHub at line 35 of file embedding.h
typedef symlist<edge>::iterator planar_embedding::iterator |
Definition at line 40 of file embedding.h.
View newest version in sPHENIX GitHub at line 40 of file embedding.h
|
inlineprivate |
Definition at line 48 of file embedding.h.
View newest version in sPHENIX GitHub at line 48 of file embedding.h
References G.
__GTL_BEGIN_NAMESPACE planar_embedding::planar_embedding | ( | const planar_embedding & | em | ) |
Make this object a copy of em
.
em | planar embedding |
Definition at line 24 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 24 of file embedding.cpp
References adj, parse_cmake_options::begin, end, forall_nodes, G, init(), it, multi, n, pos(), push_back(), and self.
|
inlinevirtual |
Destructor.
Definition at line 64 of file embedding.h.
View newest version in sPHENIX GitHub at line 64 of file embedding.h
Start iteration through adjacency list of node n
.
n | node |
Definition at line 170 of file embedding.h.
View newest version in sPHENIX GitHub at line 170 of file embedding.h
References n.
Referenced by planarity::add_to_embedding(), and planarity::run_on_biconnected().
End of iteration through adjacency list of node n
.
@p | n node |
Definition at line 183 of file embedding.h.
View newest version in sPHENIX GitHub at line 183 of file embedding.h
References n.
Referenced by planarity::add_to_embedding(), and planarity::run_on_biconnected().
Returns reference to ordered adjacency list of node n
.
n | node |
Definition at line 144 of file embedding.h.
View newest version in sPHENIX GitHub at line 144 of file embedding.h
References n.
Referenced by planarity::add_to_embedding(), planarity::attachment_cycle(), planarity::correct_embedding(), planarity::examine_obstruction(), planarity::extend_embedding(), operator=(), and planarity::run_on_biconnected().
Returns reference to ordered adjacency list of node n
.
n | node |
Definition at line 157 of file embedding.h.
View newest version in sPHENIX GitHub at line 157 of file embedding.h
References n.
bool planar_embedding::check | ( | ) |
Used for debugging only. Checks whether this is a correct planar embedding by checking the faces of the graph, i.e. at any node starting with an arbitrary adjacent edge and advancing along cyclic_next
the start node must be met through the edge given by cyclic_prev
of the edge we started with.
true | iff embedding is correct |
Definition at line 166 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 166 of file embedding.cpp
References adj, assert, parse_cmake_options::begin, cyclic_next(), cyclic_prev(), end, forall_nodes, G, it, n, next, and node::opposite().
Returns the cyclic successor of edge e
in the adjacency list of node n
.
n | node |
e | edge adjacent to n |
e
in adjacency of n
Definition at line 139 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 139 of file embedding.cpp
References adj, end, it, and pos().
Referenced by planarity::attachment_cycle(), and check().
Returns the cyclic predecessor of edge e
in the adjacency list of node n
.
n | node |
e | edge adjacent to n |
e
in adjacency of n
Definition at line 153 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 153 of file embedding.cpp
References adj, end, it, and pos().
Referenced by check().
|
private |
Definition at line 75 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 75 of file embedding.cpp
References adj, G, ne_map< Key, Value, Graph, Alloc >::init(), s_pos, and t_pos.
Referenced by operator=(), planar_embedding(), planarity::run(), and planarity::run_on_biconnected().
|
private |
Definition at line 124 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 124 of file embedding.cpp
References adj, parse_cmake_options::begin, Acts::UnitConstants::e, n, s_pos, edge::source(), and t_pos.
|
inline |
Returns list of multiple edges contained in the graph. These are edges for which there is already another edge connecting the same endpoints is contained in the adjacency lists. Please note that the notion "connecting" is meant in an undirected sense. These edges will not occur it the adjacency lists.
list | of multiple edges |
Definition at line 257 of file embedding.h.
View newest version in sPHENIX GitHub at line 257 of file embedding.h
|
inline |
Returns list of multiple edges contained in the graph. These are edges for which there is already another edge connecting the same endpoints is contained in the adjacency lists. Please note that the notion "connecting" is meant in an undirected sense. These edges will not occur it the adjacency lists.
list | of multiple edges |
Definition at line 272 of file embedding.h.
View newest version in sPHENIX GitHub at line 272 of file embedding.h
planar_embedding & planar_embedding::operator= | ( | const planar_embedding & | em | ) |
Assigns em
to this object. All former information in this object will be deleted.
em |
Definition at line 44 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 44 of file embedding.cpp
References adj, adjacency(), parse_cmake_options::begin, symlist< T >::begin(), end, symlist< T >::end(), forall_nodes, G, init(), it, multi, n, pos(), push_back(), and self.
Definition at line 109 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 109 of file embedding.cpp
References assert, Acts::UnitConstants::e, n, s_pos, edge::source(), t_pos, and edge::target().
Referenced by planarity::add_to_embedding(), cyclic_next(), cyclic_prev(), planarity::extend_embedding(), operator=(), and planar_embedding().
Definition at line 95 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 95 of file embedding.cpp
Referenced by pq_tree::dfs(), operator=(), and planar_embedding().
Definition at line 102 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 102 of file embedding.cpp
References adj, parse_cmake_options::begin, and n.
Referenced by planarity::extend_embedding().
|
inline |
Returns list of selfloops contained in the graph. These will not occur in the adjacency lists.
list | of selfloops |
Definition at line 230 of file embedding.h.
View newest version in sPHENIX GitHub at line 230 of file embedding.h
|
inline |
Returns list of selfloops contained in the graph. These will not occur in the adjacency lists.
list | of selfloops |
Definition at line 242 of file embedding.h.
View newest version in sPHENIX GitHub at line 242 of file embedding.h
|
private |
Definition at line 132 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 132 of file embedding.cpp
void planar_embedding::write_st | ( | ostream & | os, |
st_number & | st | ||
) |
Writes embedding with st-numbers as given by st
to os
.
os | output stream |
st | st-numbers |
Definition at line 196 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 196 of file embedding.cpp
References adj, parse_cmake_options::begin, st_number::begin(), end, st_number::end(), it, multi, n, and node::opposite().
Referenced by planarity::examine_obstruction().
|
friend |
Definition at line 228 of file embedding.cpp.
View newest version in sPHENIX GitHub at line 228 of file embedding.cpp
|
friend |
Definition at line 292 of file embedding.h.
View newest version in sPHENIX GitHub at line 292 of file embedding.h
|
friend |
Definition at line 297 of file embedding.h.
View newest version in sPHENIX GitHub at line 297 of file embedding.h
Definition at line 314 of file embedding.h.
View newest version in sPHENIX GitHub at line 314 of file embedding.h
Referenced by check(), cyclic_next(), cyclic_prev(), init(), insert_selfloop(), operator<<(), operator=(), planar_embedding(), push_back(), push_front(), planarity::run(), turn(), and write_st().
|
private |
Definition at line 308 of file embedding.h.
View newest version in sPHENIX GitHub at line 308 of file embedding.h
Referenced by check(), init(), operator<<(), operator=(), and planar_embedding().
|
private |
Definition at line 338 of file embedding.h.
View newest version in sPHENIX GitHub at line 338 of file embedding.h
Referenced by planarity::add_to_embedding(), operator<<(), operator=(), planar_embedding(), planarity::run_on_biconnected(), and write_st().
|
private |
Definition at line 320 of file embedding.h.
View newest version in sPHENIX GitHub at line 320 of file embedding.h
Referenced by init(), insert_selfloop(), pos(), and planarity::run().
|
private |
Definition at line 332 of file embedding.h.
View newest version in sPHENIX GitHub at line 332 of file embedding.h
Referenced by planarity::add_to_embedding(), operator<<(), operator=(), planar_embedding(), and planarity::run_on_biconnected().
|
private |
Definition at line 326 of file embedding.h.
View newest version in sPHENIX GitHub at line 326 of file embedding.h
Referenced by init(), insert_selfloop(), pos(), and planarity::run().