49namespace edge_router {
57 for (
int i = 0; i < 4; i++) {
58 for (
int j = 0;
j < 4;
j++) {
71 lu = ll = ru = rl = tl = tr = bl = br = 0;
79 get_data(H,
L, v, rc, nw,
nh);
89 , m_coord(
other.m_coord)
90 , m_ccoord(
other.m_ccoord)
91 , m_gen_pos(
other.m_gen_pos)
92 , num_s_edges(
other.num_s_edges)
93 , m_nbf(
other.m_nbf) {
94 cage_x_size =
other.cage_x_size;
95 cage_y_size =
other.cage_y_size;
96 box_x_size =
other.box_x_size;
97 box_y_size =
other.box_y_size;
108 m_firstAdj =
other.m_firstAdj;
110 m_vdegree =
other.m_vdegree;
112 for (
int i = 0; i < 4; ++i) {
114 in_edges[i] = std::move(
other.in_edges[i]);
115 point_in[i] = std::move(
other.point_in[i]);
117 for (
int j = 0;
j < 4; ++
j) {
118 m_delta[i][
j] =
other.m_delta[i][
j];
119 m_eps[i][
j] =
other.m_eps[i][
j];
120 m_routable[i][
j] =
other.m_routable[i][
j];
121 m_flips[i][
j] =
other.m_flips[i][
j];
122 m_nbe[i][
j] =
other.m_nbe[i][
j];
138 int bsi =
static_cast<int>(
bs);
140 case OrthoDir::South:
142 result = m_ccoord[
bsi] - m_coord[
bsi];
144 case OrthoDir::North:
146 result = m_coord[
bsi] - m_ccoord[
bsi];
149 std::cout <<
"unknown direction in coordDistance" << std::flush;
162 return (
static_cast<int>(
od) % 2 == 0) ? box_y_size : box_x_size;
166 return (
static_cast<int>(
od) % 2 == 0) ? cage_y_size : cage_x_size;
208 return m_nbe[
static_cast<int>(s1)][
static_cast<int>(
sneighbour)];
213 return m_flips[
static_cast<int>(s1)][
static_cast<int>(s2)];
222 return num_s_edges[
static_cast<int>(
od)];
244 case OrthoDir::North:
245 case OrthoDir::South:
246 if (
dval > box_y_size) {
252 if (
dval > box_x_size) {
273 m_gen_pos[
static_cast<int>(
od)] = pos;
277 num_s_edges[
static_cast<int>(
od)] = num;
282 cage_x_size = m_ccoord[
static_cast<int>(OrthoDir::South)]
283 - m_ccoord[
static_cast<int>(OrthoDir::North)];
284 cage_y_size = m_ccoord[
static_cast<int>(OrthoDir::East)]
285 - m_ccoord[
static_cast<int>(OrthoDir::West)];
314 m_nbe[
static_cast<int>(
s_from)][
static_cast<int>(
s_to)] += num;
324 return m_routable[
static_cast<int>(
s_from)][
static_cast<int>(
s_to)];
339 int lu, ll, ru, rl, tl, tr,
bl, br;
345 int m_routable[4][4];
Declaration and implementation of AdjEntryArray class.
Declaration of class GridLayout.
Declaration of class MinimumEdgeDistances which maintains minimum distances between attached edges at...
Declaration of orthogonal representation of planar graphs.
Declaration of a base class for planar representations of graphs and cluster graphs.
Declaration of class RoutingChannel which maintains required size of routing channels and separation,...
Class for adjacency list elements.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing.
Representation of a graph's grid layout.
Doubly linked lists (maintaining the length of the list).
Encapsulates a pointer to a list element.
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
Orthogonal representation of an embedded graph.
Maintains input sizes for constructive compaction (size of routing channels, separation,...
int num_routable(OrthoDir s_from, OrthoDir s_to) const
int coord(OrthoDir bs) const
Returns nodeboxside coordinates (real size)
List< edge > & inList(OrthoDir bs)
NodeInfo(OrthoRep &H, GridLayout &L, node v, adjEntry adj, RoutingChannel< int > &rc, NodeArray< int > &nw, NodeArray< int > &nh)
NodeInfo(NodeInfo &&other)
void num_bend_free_increment(OrthoDir s)
void setCageCoord(OrthoDir bs, int co)
bool has_gen(OrthoDir od)
int gen_pos(OrthoDir od) const
void compute_cage_size()
compute the size of the cage face and the node box
int & flips(OrthoDir s1, OrthoDir s2)
bool is_in_edge(OrthoDir od, int pos)
void inc_E_hook(OrthoDir s_from, OrthoDir s_to, int num=1)
List< bool > & inPoint(OrthoDir bs)
std::array< List< bool >, 4 > point_in
void set_coord(OrthoDir bs, int co)
NodeInfo & operator=(const NodeInfo &)=default
int num_bend_free(OrthoDir s) const
std::array< List< edge >, 4 > in_edges
NodeInfo(const NodeInfo &)=default
void set_gen_pos(OrthoDir od, int pos)
set position of generalization on each side
int eps(OrthoDir mainside, OrthoDir neighbour) const
void set_delta(OrthoDir bside, OrthoDir bneighbour, int dval)
int coordDistance(OrthoDir bs)
void inc_E(OrthoDir s_from, OrthoDir s_to, int num=1)
std::array< int, 4 > m_nbf
int cageSize(OrthoDir od) const
void set_eps(OrthoDir mainside, OrthoDir neighbour, int dval)
void set_num_edges(OrthoDir od, int num)
int delta(OrthoDir mainside, OrthoDir neighbour) const
int cageCoord(OrthoDir bs) const
Returns nodecageside coordinates (expanded size)
std::array< int, 4 > num_s_edges
std::array< int, 4 > m_rc
friend std::ostream & operator<<(std::ostream &O, const NodeInfo &inf)
int num_bend_edges(OrthoDir s1, OrthoDir sneighbour)
std::array< int, 4 > m_ccoord
void get_data(OrthoRep &O, GridLayout &L, node v, RoutingChannel< int > &rc, NodeArray< int > &nw, NodeArray< int > &nh)
int num_edges(OrthoDir od) const
int rc(OrthoDir od) const
Returns routing channel size.
std::array< int, 4 > m_gen_pos
int nodeSize(OrthoDir od) const
std::array< int, 4 > m_coord
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
#define OGDF_THROW(CLASS)
Replacement for throw.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
std::ostream & operator<<(std::ostream &O, const NodeInfo &inf)
The namespace for all OGDF objects.