48 namespace edge_router {
58 for (
int i = 0; i < 4; i++)
60 for (
int j = 0; j < 4; j++)
74 lu = ll = ru = rl = tl = tr = bl = br = 0;
88 get_data(H, L, v, rc, nw, nh);
97 : m_rc(other.m_rc), m_coord(other.m_coord), m_ccoord(other.m_ccoord),
98 m_gen_pos(other.m_gen_pos), num_s_edges(other.num_s_edges), m_nbf(other.m_nbf)
100 cage_x_size = other.cage_x_size;
101 cage_y_size = other.cage_y_size;
102 box_x_size = other.box_x_size;
103 box_y_size = other.box_y_size;
114 m_firstAdj = other.m_firstAdj;
116 m_vdegree = other.m_vdegree;
118 for (
int i = 0; i < 4; ++i) {
120 in_edges[i] =
std::move(other.in_edges[i]);
121 point_in[i] =
std::move(other.point_in[i]);
123 for (
int j = 0; j < 4; ++j) {
124 m_delta [i][j] = other.m_delta [i][j];
125 m_eps [i][j] = other.m_eps [i][j];
126 m_routable[i][j] = other.m_routable[i][j];
127 m_flips [i][j] = other.m_flips [i][j];
128 m_nbe [i][j] = other.m_nbe [i][j];
143 int bsi =
static_cast<int>(bs);
148 result = m_ccoord[bsi] - m_coord[bsi];
152 result = m_coord[bsi] - m_ccoord[bsi];
154 default: cout<<
"unknown direction in coordDistance"<<flush;
164 int nodeSize(
OrthoDir od)
const {
return (static_cast<int>(od) % 2 == 0) ? box_y_size : box_x_size; }
165 int cageSize(
OrthoDir od)
const {
return (static_cast<int>(od) % 2 == 0) ? cage_y_size : cage_x_size; }
166 int rc(
OrthoDir od)
const {
return m_rc[
static_cast<int>(od)]; }
184 int delta(
OrthoDir mainside,
OrthoDir neighbour)
const {
return m_delta[
static_cast<int>(mainside)][static_cast<int>(neighbour)]; }
187 int eps(
OrthoDir mainside,
OrthoDir neighbour)
const {
return m_eps[
static_cast<int>(mainside)][static_cast<int>(neighbour)]; }
198 return num_s_edges[
static_cast<int>(od)];
215 int bsidei =
static_cast<int>(bside);
216 int bneighbouri =
static_cast<int>(bneighbour);
221 if (dval > box_y_size) {
222 dval = int(floor(((
double)box_y_size / 2))) - m_eps[bsidei][bneighbouri];
226 if (dval > box_x_size) {
227 dval = int(floor(((
double)box_x_size / 2))) - m_eps[bsidei][bneighbouri];
232 m_delta[bsidei][bneighbouri] = dval;
235 void set_eps(
OrthoDir mainside,
OrthoDir neighbour,
int dval) { m_eps[
static_cast<int>(mainside)][static_cast<int>(neighbour)] = dval; }
238 void set_num_bend_edges(box_side bs1, box_side bs2,
int num) {nbe[bs1][bs2] = num;}
244 m_gen_pos[
static_cast<int>(od)] = pos;
247 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; m_nbe[s_from_i][s_to_i] += num;
274 m_nbe[
static_cast<int>(s_from)][static_cast<int>(s_to)] += num;
297 box_x_size, box_y_size;
298 int lu,ll,ru,rl,tl,
tr,bl,br;
304 int m_routable[4][4];
Representation of a graph's grid layout.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Declaration of orthogonal representation of planar graphs.
Declaration and implementation of AdjEntryArray class.
#define OGDF_THROW(CLASS)
Replacement for throw.
std::array< List< edge >, 4 > in_edges
int num_bend_free(OrthoDir s) const
Orthogonal representation of an embedded graph.
ostream & operator<<(ostream &O, const NodeInfo &inf)
Declaration of a base class for planar representations of graphs and cluster graphs.
std::array< int, 4 > m_rc
List< edge > & inList(OrthoDir bs)
int delta(OrthoDir mainside, OrthoDir neighbour) const
int gen_pos(OrthoDir od) const
Declaration of class RoutingChannel which maintains required size of routing channels and separation...
void set_eps(OrthoDir mainside, OrthoDir neighbour, int dval)
void set_gen_pos(OrthoDir od, int pos)
set position of generalization on each side
int nodeSize(OrthoDir od) const
std::array< int, 4 > num_s_edges
void set_num_edges(OrthoDir od, int num)
int eps(OrthoDir mainside, OrthoDir neighbour) const
int cageCoord(OrthoDir bs) const
std::array< int, 4 > m_ccoord
std::array< int, 4 > m_gen_pos
Declaration of class GridLayout.
std::array< int, 4 > m_nbf
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing...
std::array< int, 4 > m_coord
int coord(OrthoDir bs) const
NodeInfo(NodeInfo &&other)
std::array< List< bool >, 4 > point_in
void num_bend_free_increment(OrthoDir s)
List< bool > & inPoint(OrthoDir bs)
Class for the representation of nodes.
Encapsulates a pointer to a list element.
int & flips(OrthoDir s1, OrthoDir s2)
const T & move(const T &v)
void compute_cage_size()
compute the size of the cage face and the node box
int cageSize(OrthoDir od) const
void set_coord(OrthoDir bs, int co)
int coordDistance(OrthoDir bs)
int num_bend_edges(OrthoDir s1, OrthoDir sneighbour)
Declaration of class MinimumEdgeDistances which maintains minimum distances between attached edges at...
int num_edges(OrthoDir od) const
void setCageCoord(OrthoDir bs, int co)
int rc(OrthoDir od) const
bool has_gen(OrthoDir od)
void set_delta(OrthoDir bside, OrthoDir bneighbour, int dval)
The namespace for all OGDF objects.
void inc_E_hook(OrthoDir s_from, OrthoDir s_to, int num=1)
bool is_in_edge(OrthoDir od, int pos)
int num_routable(OrthoDir s_from, OrthoDir s_to) const
Class for adjacency list elements.
void inc_E(OrthoDir s_from, OrthoDir s_to, int num=1)
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
NodeInfo(OrthoRep &H, GridLayout &L, node v, adjEntry adj, RoutingChannel< int > &rc, NodeArray< int > &nw, NodeArray< int > &nh)