|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
53 namespace edge_router {
61 for (
int i = 0; i < 4; i++) {
62 for (
int j = 0; j < 4; j++) {
76 lu = ll = ru = rl = tl = tr = bl = br = 0;
77 cage_x_size = cage_y_size = box_x_size = box_y_size = 0;
79 m_firstAdj = m_adj =
nullptr;
87 get_data(H, L, v, rc, nw, nh);
99 int bsi =
static_cast<int>(bs);
103 result = m_ccoord[bsi] - m_coord[bsi];
107 result = m_coord[bsi] - m_ccoord[bsi];
110 std::cout <<
"unknown direction in coordDistance" << std::flush;
123 return (
static_cast<int>(od) % 2 == 0) ? box_y_size : box_x_size;
127 return (
static_cast<int>(od) % 2 == 0) ? cage_y_size : cage_x_size;
131 int rc(
OrthoDir od)
const {
return m_rc[
static_cast<int>(od)]; }
159 return m_delta[
static_cast<int>(mainside)][
static_cast<int>(neighbour)];
164 return m_eps[
static_cast<int>(mainside)][
static_cast<int>(neighbour)];
169 return m_nbe[
static_cast<int>(s1)][
static_cast<int>(sneighbour)];
174 return m_flips[
static_cast<int>(s1)][
static_cast<int>(s2)];
183 return num_s_edges[
static_cast<int>(od)];
203 int bsidei =
static_cast<int>(bside);
204 int bneighbouri =
static_cast<int>(bneighbour);
208 if (dval > box_y_size) {
209 dval = int(floor(((
double)box_y_size / 2))) - m_eps[bsidei][bneighbouri];
214 if (dval > box_x_size) {
215 dval = int(floor(((
double)box_x_size / 2))) - m_eps[bsidei][bneighbouri];
221 m_delta[bsidei][bneighbouri] = dval;
225 m_eps[
static_cast<int>(mainside)][
static_cast<int>(neighbour)] = dval;
229 void set_num_bend_edges(box_side bs1, box_side bs2,
int num) {nbe[bs1][bs2] = num;}
235 m_gen_pos[
static_cast<int>(od)] = pos;
239 num_s_edges[
static_cast<int>(od)] = num;
269 int s_from_i =
static_cast<int>(s_from);
270 int s_to_i =
static_cast<int>(s_to);
271 m_routable[s_from_i][s_to_i] += num;
272 m_nbe[s_from_i][s_to_i] += num;
276 m_nbe[
static_cast<int>(s_from)][
static_cast<int>(s_to)] += num;
286 return m_routable[
static_cast<int>(s_from)][
static_cast<int>(s_to)];
301 int lu, ll, ru, rl, tl,
tr, bl, br;
307 int m_routable[4][4];
The namespace for all OGDF objects.
Includes declaration of graph class.
void set_num_edges(OrthoDir od, int num)
Definition of exception classes.
int & flips(OrthoDir s1, OrthoDir s2)
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
std::array< int, 4 > m_rc
void set_coord(OrthoDir bs, int co)
std::array< int, 4 > m_coord
void setCageCoord(OrthoDir bs, int co)
std::array< int, 4 > m_gen_pos
int coord(OrthoDir bs) const
Returns nodeboxside coordinates (real size)
int rc(OrthoDir od) const
Returns routing channel size.
int coordDistance(OrthoDir bs)
List< bool > & inPoint(OrthoDir bs)
int cageSize(OrthoDir od) const
std::array< List< edge >, 4 > in_edges
std::array< List< bool >, 4 > point_in
void inc_E_hook(OrthoDir s_from, OrthoDir s_to, int num=1)
bool valid() const
Returns true iff the iterator points to an element.
int num_bend_edges(OrthoDir s1, OrthoDir sneighbour)
void compute_cage_size()
compute the size of the cage face and the node box
bool has_gen(OrthoDir od)
void set_delta(OrthoDir bside, OrthoDir bneighbour, int dval)
bool is_in_edge(OrthoDir od, int pos)
Class for adjacency list elements.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing.
int num_edges(OrthoDir od) const
int num_routable(OrthoDir s_from, OrthoDir s_to) const
NodeInfo(OrthoRep &H, GridLayout &L, node v, adjEntry adj, RoutingChannel< int > &rc, NodeArray< int > &nw, NodeArray< int > &nh)
Declaration of orthogonal representation of planar graphs.
#define OGDF_THROW(CLASS)
Replacement for throw.
Orthogonal representation of an embedded graph.
void inc_E(OrthoDir s_from, OrthoDir s_to, int num=1)
std::array< int, 4 > num_s_edges
RegisteredArray for nodes, edges and adjEntries of a graph.
List< edge > & inList(OrthoDir bs)
Basic declarations, included by all source files.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
int num_bend_free(OrthoDir s) const
int gen_pos(OrthoDir od) const
int delta(OrthoDir mainside, OrthoDir neighbour) const
std::array< int, 4 > m_ccoord
Declaration of doubly linked lists and iterators.
std::array< int, 4 > m_nbf
Representation of a graph's grid layout.
int cageCoord(OrthoDir bs) const
Returns nodecageside coordinates (expanded size)
Encapsulates a pointer to a list element.
void set_eps(OrthoDir mainside, OrthoDir neighbour, int dval)
Declaration of class RoutingChannel which maintains required size of routing channels and separation,...
void set_gen_pos(OrthoDir od, int pos)
set position of generalization on each side
std::ostream & operator<<(std::ostream &O, const NodeInfo &inf)
Class for the representation of nodes.
void num_bend_free_increment(OrthoDir s)
int eps(OrthoDir mainside, OrthoDir neighbour) const
int nodeSize(OrthoDir od) const