Places node boxes in replacement areas of orthogonal drawing step and route edges to minimize bends. More...
#include <ogdf/orthogonal/EdgeRouter.h>
Public Member Functions | |
EdgeRouter () | |
EdgeRouter (PlanRep &pru, OrthoRep &H, GridLayoutMapped &L, CombinatorialEmbedding &E, RoutingChannel< int > &rou, MinimumEdgeDistances< int > &med, NodeArray< int > &nodewidth, NodeArray< int > &nodeheight) | |
virtual | ~EdgeRouter () |
void | addbends (BendString &bs, const char *s2) |
edge | addLeftBend (edge e) |
edge | addRightBend (edge e) |
void | align (bool b) |
set alignment option: place nodes in cage at outgoing generalization More... | |
void | call () |
places nodes in cages and routes incident edges More... | |
void | call (PlanRep &pru, OrthoRep &H, GridLayoutMapped &L, CombinatorialEmbedding &E, RoutingChannel< int > &rou, MinimumEdgeDistances< int > &med, NodeArray< int > &nodewidth, NodeArray< int > &nodeheight, bool align=false) |
places nodes in cages and routes incident edges More... | |
void | compute_gen_glue_points_x (node v) |
compute glue points positions More... | |
void | compute_gen_glue_points_y (node v) |
compute glue points positions More... | |
void | compute_glue_points_x (node &v) |
compute glue points positions More... | |
void | compute_glue_points_y (node v) |
compute glue points positions More... | |
void | compute_place (node v, NodeInfo &inf) |
computes placement More... | |
void | compute_routing (node v) |
computes routing after compute_place More... | |
int | cp_x (adjEntry ae) |
Returns assigned connection point (cage border) x-coordinate of ae 's source. More... | |
int | cp_y (adjEntry ae) |
Returns assigned connection point (cage border) y-coordinate of ae 's source. More... | |
void | fix_position (node v, int x=0, int y=0) |
same as set but updates m_fixed, coordinates cant be changed afterwards More... | |
int | gp_x (adjEntry ae) |
Returns assigned glue point (node border) x-coordinate. More... | |
int | gp_y (adjEntry ae) |
Returns assigned glue point (node border) y-coordinate. More... | |
adjEntry | inEntry (NodeInfo &inf, OrthoDir d, int pos) |
adjEntries for edges in inLists More... | |
void | init (PlanRep &pru, RoutingChannel< int > &rou, bool align=false) |
void | initialize_node_info (node v, int sep) |
sets values derivable from input More... | |
void | multiDelta () |
for all multiple edges, set the delta value on both sides to minimum if not m_minDelta More... | |
adjEntry | outEntry (NodeInfo &inf, OrthoDir d, int pos) |
adjEntries for edges in inLists More... | |
void | place (node v) |
applies precomputed placement More... | |
void | set_position (node v, int x=0, int y=0) |
sets position for node v in layout to value x,y, invoked to have central control over change More... | |
void | setDistances () |
sets the computed distances in structure MinimumEdgeDistance m_med More... | |
Private Types | |
enum | BendType { BendType::BendFree, BendType::Bend1Left, BendType::Bend1Right, BendType::Bend2Left, BendType::Bend2Right, BendType::ProbBf, BendType::ProbB1L, BendType::ProbB1R, BendType::ProbB2L, BendType::ProbB2R } |
Edge types, defined by necessary bends. More... | |
using | NodeInfo = edge_router::NodeInfo |
enum | ProcessType { ProcessType::unprocessed, ProcessType::processed, ProcessType::used } |
Process status of nodes. More... | |
Private Member Functions | |
BendType | abendType (adjEntry ae) |
int | alpha_move (OrthoDir s_to, OrthoDir s_from, node v) |
computes the alpha value described in the paper More... | |
int | beta_move (OrthoDir s_from, OrthoDir s_to, int move_num, node v) |
computes the beta value described in the paper More... | |
int | compute_move (OrthoDir s_from, OrthoDir s_to, int &kflip, node v) |
compute the maximum number of moveable edges More... | |
bool | oppositeExpander (adjEntry ae) |
check if the target node of the outgoing adjEntry still is a expander More... | |
node | oppositeNode (adjEntry ae) |
helper for oppositeExpander More... | |
void | set_corners (node v) |
set coordinates of cage corners after placement More... | |
void | unsplit (edge e1, edge e2) |
int | updateBends (const node v, ListIterator< edge > &it, const bool updateX, const OrthoDir dir, const bool bendLeft, const bool bendUp, int pos=0) |
void | updateBends (const node v, ListIterator< edge > &it, int &pos, int &lastunbend, const bool updateX, const OrthoDir dir, const bool bendLeft, const bool bendUp, const bool subtract) |
void | updateLowerEdgesBends (const node v, ListIterator< edge > &it, int &pos, int &base, const bool updateX, const OrthoDir dir, const bool bendLeft) |
void | updateOneBend (const bool isDoubleBend, const adjEntry adj, const node v, const OrthoDir dir, const bool bendLeft, const BendType btSingle, const BendType btDouble) |
Private Attributes | |
AdjEntryArray< int > | alefte |
AdjEntryArray< int > | alowe |
AdjEntryArray< int > | arighte |
AdjEntryArray< int > | auppe |
double | Cconst |
relative sep to overhang / delta to eps More... | |
NodeArray< NodeInfo > | infos |
holds the cage and placement information More... | |
EdgeArray< int > | lefte |
EdgeArray< int > | lowe |
AdjEntryArray< BendType > | m_abends |
bends More... | |
AdjEntryArray< int > | m_acp_x |
AdjEntryArray< int > | m_acp_y |
edge connection point coordinates before treatment More... | |
AdjEntryArray< int > | m_agp_x |
AdjEntryArray< int > | m_agp_y |
because edges can connect two replacement cages More... | |
bool | m_align |
AdjEntryArray< node > | m_cage_point |
newly introduced bends destroy edge to point connection More... | |
CombinatorialEmbedding * | m_comb |
NodeArray< bool > | m_fixed |
saves info about changed position, no further change is allowed More... | |
GridLayoutMapped * | m_layoutp |
MinimumEdgeDistances< int > * | m_med |
NodeArray< OrthoDir > | m_mergeDir |
direction of adjacent (to) merger edges More... | |
NodeArray< bool > | m_mergerSon |
is part of merger son cage More... | |
bool | m_minDelta |
set minimum delta values for flip decision and adjust distances correspondingly More... | |
NodeArray< int > | m_newx |
NodeArray< int > | m_newy |
new placement position for original node More... | |
NodeArray< int > * | m_nodeheight |
NodeArray< int > * | m_nodewidth |
NodeArray< BendType > | m_oppositeBendType |
keep the information about the type of bend inserted at one end of an (originally unbend) edge, so that we can check possible bendsaving More... | |
OrthoRep * | m_orp |
int | m_overh |
minimum overhang More... | |
NodeArray< ProcessType > | m_processStatus |
keep information about already processed Nodes More... | |
PlanRep * | m_prup |
RoutingChannel< int > * | m_rc |
int | m_sep |
minimum separation More... | |
EdgeArray< int > | righte |
max box borders for bendfree edges More... | |
EdgeArray< int > | uppe |
Places node boxes in replacement areas of orthogonal drawing step and route edges to minimize bends.
Definition at line 55 of file EdgeRouter.h.
|
private |
Definition at line 56 of file EdgeRouter.h.
|
strongprivate |
Edge types, defined by necessary bends.
Definition at line 166 of file EdgeRouter.h.
|
strongprivate |
Process status of nodes.
Enumerator | |
---|---|
unprocessed | unprocessed |
processed | processed in degree-1 preprocessing |
used | used by degree-1 |
Definition at line 190 of file EdgeRouter.h.
|
inline |
Definition at line 60 of file EdgeRouter.h.
ogdf::EdgeRouter::EdgeRouter | ( | PlanRep & | pru, |
OrthoRep & | H, | ||
GridLayoutMapped & | L, | ||
CombinatorialEmbedding & | E, | ||
RoutingChannel< int > & | rou, | ||
MinimumEdgeDistances< int > & | med, | ||
NodeArray< int > & | nodewidth, | ||
NodeArray< int > & | nodeheight | ||
) |
|
inlinevirtual |
Definition at line 66 of file EdgeRouter.h.
Definition at line 214 of file EdgeRouter.h.
void ogdf::EdgeRouter::addbends | ( | BendString & | bs, |
const char * | s2 | ||
) |
|
inline |
set alignment option: place nodes in cage at outgoing generalization
postprocessing function, hmm maybe preprocessing
Definition at line 157 of file EdgeRouter.h.
computes the alpha value described in the paper
computes the beta value described in the paper
number of additional bend free edges on side s_from if move_num edges are moved from side s_from to s_to
void ogdf::EdgeRouter::call | ( | ) |
places nodes in cages and routes incident edges
void ogdf::EdgeRouter::call | ( | PlanRep & | pru, |
OrthoRep & | H, | ||
GridLayoutMapped & | L, | ||
CombinatorialEmbedding & | E, | ||
RoutingChannel< int > & | rou, | ||
MinimumEdgeDistances< int > & | med, | ||
NodeArray< int > & | nodewidth, | ||
NodeArray< int > & | nodeheight, | ||
bool | align = false |
||
) |
places nodes in cages and routes incident edges
void ogdf::EdgeRouter::compute_gen_glue_points_x | ( | node | v | ) |
compute glue points positions
void ogdf::EdgeRouter::compute_gen_glue_points_y | ( | node | v | ) |
compute glue points positions
void ogdf::EdgeRouter::compute_glue_points_x | ( | node & | v | ) |
compute glue points positions
void ogdf::EdgeRouter::compute_glue_points_y | ( | node | v | ) |
compute glue points positions
compute the maximum number of moveable edges
dependant on space on available edges, return number of saved bends
void ogdf::EdgeRouter::compute_routing | ( | node | v | ) |
computes routing after compute_place
|
inline |
Returns assigned connection point (cage border) x-coordinate of ae
's source.
Definition at line 106 of file EdgeRouter.h.
|
inline |
Returns assigned connection point (cage border) y-coordinate of ae
's source.
Definition at line 109 of file EdgeRouter.h.
void ogdf::EdgeRouter::fix_position | ( | node | v, |
int | x = 0 , |
||
int | y = 0 |
||
) |
same as set but updates m_fixed, coordinates cant be changed afterwards
|
inline |
Returns assigned glue point (node border) x-coordinate.
Definition at line 112 of file EdgeRouter.h.
|
inline |
Returns assigned glue point (node border) y-coordinate.
Definition at line 115 of file EdgeRouter.h.
adjEntries for edges in inLists
Definition at line 133 of file EdgeRouter.h.
void ogdf::EdgeRouter::init | ( | PlanRep & | pru, |
RoutingChannel< int > & | rou, | ||
bool | align = false |
||
) |
void ogdf::EdgeRouter::initialize_node_info | ( | node | v, |
int | sep | ||
) |
sets values derivable from input
void ogdf::EdgeRouter::multiDelta | ( | ) |
for all multiple edges, set the delta value on both sides to minimum if not m_minDelta
postprocessing function, hmm maybe preprocessing
|
inlineprivate |
check if the target node of the outgoing adjEntry still is a expander
Definition at line 231 of file EdgeRouter.h.
helper for oppositeExpander
Definition at line 228 of file EdgeRouter.h.
adjEntries for edges in inLists
Definition at line 124 of file EdgeRouter.h.
void ogdf::EdgeRouter::place | ( | node | v | ) |
applies precomputed placement
|
private |
set coordinates of cage corners after placement
void ogdf::EdgeRouter::set_position | ( | node | v, |
int | x = 0 , |
||
int | y = 0 |
||
) |
sets position for node v in layout to value x,y, invoked to have central control over change
void ogdf::EdgeRouter::setDistances | ( | ) |
sets the computed distances in structure MinimumEdgeDistance m_med
|
private |
|
private |
|
private |
|
inlineprivate |
Definition at line 262 of file EdgeRouter.h.
|
private |
Definition at line 281 of file EdgeRouter.h.
|
private |
Definition at line 281 of file EdgeRouter.h.
|
private |
Definition at line 281 of file EdgeRouter.h.
|
private |
Definition at line 281 of file EdgeRouter.h.
|
private |
relative sep to overhang / delta to eps
Definition at line 212 of file EdgeRouter.h.
holds the cage and placement information
Definition at line 208 of file EdgeRouter.h.
|
private |
Definition at line 280 of file EdgeRouter.h.
|
private |
Definition at line 280 of file EdgeRouter.h.
|
private |
bends
0 = bendfree, 1 = single bend from left to node, 2 = single from right, 3 = int from left, 4 = int from right,...
Definition at line 292 of file EdgeRouter.h.
|
private |
Definition at line 284 of file EdgeRouter.h.
|
private |
edge connection point coordinates before treatment
Definition at line 284 of file EdgeRouter.h.
|
private |
Definition at line 282 of file EdgeRouter.h.
|
private |
because edges can connect two replacement cages
Definition at line 282 of file EdgeRouter.h.
|
private |
Definition at line 303 of file EdgeRouter.h.
|
private |
newly introduced bends destroy edge to point connection
Definition at line 283 of file EdgeRouter.h.
|
private |
Definition at line 202 of file EdgeRouter.h.
|
private |
saves info about changed position, no further change is allowed
Definition at line 279 of file EdgeRouter.h.
|
private |
Definition at line 200 of file EdgeRouter.h.
|
private |
Definition at line 204 of file EdgeRouter.h.
direction of adjacent (to) merger edges
Definition at line 302 of file EdgeRouter.h.
|
private |
is part of merger son cage
Definition at line 301 of file EdgeRouter.h.
|
private |
set minimum delta values for flip decision and adjust distances correspondingly
Definition at line 225 of file EdgeRouter.h.
|
private |
Definition at line 278 of file EdgeRouter.h.
|
private |
new placement position for original node
Definition at line 278 of file EdgeRouter.h.
|
private |
Definition at line 206 of file EdgeRouter.h.
|
private |
Definition at line 205 of file EdgeRouter.h.
keep the information about the type of bend inserted at one end of an (originally unbend) edge, so that we can check possible bendsaving
Definition at line 295 of file EdgeRouter.h.
|
private |
Definition at line 201 of file EdgeRouter.h.
|
private |
minimum overhang
Definition at line 211 of file EdgeRouter.h.
|
private |
keep information about already processed Nodes
Definition at line 298 of file EdgeRouter.h.
|
private |
Definition at line 199 of file EdgeRouter.h.
|
private |
Definition at line 203 of file EdgeRouter.h.
|
private |
minimum separation
Definition at line 210 of file EdgeRouter.h.
|
private |
max box borders for bendfree edges
Definition at line 280 of file EdgeRouter.h.
|
private |
Definition at line 280 of file EdgeRouter.h.