#include <rm3_dime_orth_plan_undi_graph.h>
1 - FAST_COMPACTION execute a linear-time compaction using a rectangularization and a DFS
2 - SLOW_COMPACTION execute a polynomial-time compaction using a rectangularization and flow techniques
3 - FAST_REGULAR_COMPACTION_1 execute a linear-time compaction using a regularization with "heuristic 1" and a DFS
4 - SLOW_REGULAR_COMPACTION_1 execute a polynomial-time compaction using a regularization with "heuristic 1" and flow techniques
5 - FAST_REGULAR_COMPACTION_2 execute a linear-time compaction using a regularization with "heuristic 2" and a DFS
6 - SLOW_REGULAR_COMPACTION_2 execute a polynomial-time compaction using a regularization with "heuristic 2" and flow techniques
Once that the dime_orth_plan_undi_graph has been initialized, it is manteined rectangularized. Nodes and edges added by rectangularization algorithm are marked as RM3_ADDED_BY_RECTANGULARIZATION.
Definition at line 385 of file rm3_dime_orth_plan_undi_graph.h.
dime_orth_plan_undi_graph::dime_orth_plan_undi_graph | ( | ) |
Empty constructor.
dime_orth_plan_undi_graph::~dime_orth_plan_undi_graph | ( | ) |
dime_orth_plan_undi_graph::dime_orth_plan_undi_graph | ( | const undi_graph & | ug, | |
algorithm_type | alg = SLOW_COMPACTION | |||
) |
Constructor from the undi_graph class, applying the algorithm_type for compaction.
dime_orth_plan_undi_graph::dime_orth_plan_undi_graph | ( | const undi_graph & | ug, | |
algorithm_type | alg, | |||
int & | num_irr_faces | |||
) |
Constructor from the undi_graph class, applying the algorithm_type for compaction. num_irr_faces is the number of irregular faces if an algorithm based on regularization is chosen
dime_orth_plan_undi_graph::dime_orth_plan_undi_graph | ( | const plan_undi_graph & | pug, | |
algorithm_type | alg = SLOW_COMPACTION | |||
) |
Constructor from the plan_undi_graph class, applying the algorithm_type for compaction.
dime_orth_plan_undi_graph::dime_orth_plan_undi_graph | ( | const plan_undi_graph & | pug, | |
algorithm_type | alg, | |||
int & | numm_irr_faces | |||
) |
Constructor from the plan_undi_graph class, applying the algorithm_type for compaction. num_irr_faces is the number of irregular faces if an algorithm based on regularization is chosen
dime_orth_plan_undi_graph::dime_orth_plan_undi_graph | ( | const orth_plan_undi_graph & | opug, | |
algorithm_type | alg = SLOW_COMPACTION | |||
) |
Constructor from the orth_plan_undi_graph class, applying the algorithm_type for compaction.
dime_orth_plan_undi_graph::dime_orth_plan_undi_graph | ( | const orth_plan_undi_graph & | opug, | |
algorithm_type | alg, | |||
heading_type | dir | |||
) |
Constructor from the orth_plan_undi_graph class, applying the algorithm_type for compaction. "dir" specifies the initial direction fro the reference border step.
dime_orth_plan_undi_graph::dime_orth_plan_undi_graph | ( | const orth_plan_undi_graph & | opug, | |
algorithm_type | alg, | |||
heading_type | dir, | |||
int & | num_irr_faces | |||
) |
Constructor from the orth_plan_undi_graph class, applying the algorithm_type for compaction. "num_irr_faces" is the number of irregular faces if an algorithm based on regularization is chosen. "dir" specifies the initial direction fro the reference border step.
dime_orth_plan_undi_graph::dime_orth_plan_undi_graph | ( | const dime_orth_plan_undi_graph & | dopug | ) |
Copy constructor.
dime_orth_plan_undi_graph& dime_orth_plan_undi_graph::operator= | ( | const undi_graph & | ug | ) |
Equality operator from undi_graph_class.
Reimplemented from orth_plan_undi_graph.
dime_orth_plan_undi_graph& dime_orth_plan_undi_graph::operator= | ( | const plan_undi_graph & | pug | ) |
Equality operator from plan_undi_graph class.
Reimplemented from orth_plan_undi_graph.
dime_orth_plan_undi_graph& dime_orth_plan_undi_graph::operator= | ( | const orth_plan_undi_graph & | opug | ) |
Equality operator from orth_plan_undi_graph class.
Reimplemented from orth_plan_undi_graph.
dime_orth_plan_undi_graph& dime_orth_plan_undi_graph::operator= | ( | const dime_orth_plan_undi_graph & | dopug | ) |
Copy equality operator.
void dime_orth_plan_undi_graph::local_get | ( | bool & | p1, | |
heading_type & | p2, | |||
gdt::gdtnode_map< struct_dime_node_info > *& | p3, | |||
gdt::gdtedge_map< struct_dime_edge_info > *& | p4, | |||
gdt::gdtmap< border_step, struct_dime_border_step_info > *& | p5 | |||
) |
Get all private variables.
heading_type dime_orth_plan_undi_graph::initial_heading_of_border_step | ( | border_step | s | ) | const |
Return the initial heading of border_step.
heading_type dime_orth_plan_undi_graph::heading_after_border_step | ( | border_step | s | ) | const |
Return the heading after walking on border step.
static heading_type dime_orth_plan_undi_graph::heading_after_rotation | ( | heading_type | d, | |
angle_type | a | |||
) | [static] |
Static method. Return the heading obtained from heading_type after a clockwise angle_type rotation.
heading_type dime_orth_plan_undi_graph::heading_after_rotation_around_bend | ( | heading_type | d, | |
angle_type | a | |||
) | const |
Return heading_after_rotation (heading_type, angle_type).
heading_type dime_orth_plan_undi_graph::heading_after_inversion | ( | heading_type | d | ) | const |
Return heading_after_rotation (heading_type, _360).
heading_type dime_orth_plan_undi_graph::heading_after_bend | ( | heading_type | d, | |
bend_type | b | |||
) | const |
Return the heading obtained from heading_type after a bend_type.
heading_type dime_orth_plan_undi_graph::heading_after_bend_sequence | ( | heading_type | d, | |
gdt::gdtlist< bend_type > | bl | |||
) | const |
Return the heading obtained from heading_type after the gdt::gdtlist<bend_type> sequence.
gdt::gdtlist<bend_type> dime_orth_plan_undi_graph::minimal_bend_sequence_required_to_change_heading | ( | heading_type | i, | |
heading_type | f | |||
) | const |
Return a minimal list of bend_types required to change from first heading_type to the second one.
heading_type dime_orth_plan_undi_graph::position_of_node_with_respect_to_edge | ( | gdtnode | v, | |
gdtedge | e | |||
) | const |
Return the relative position of gdtnode with respect to gdtedge. If v is source or target of e then if e is horizontal the position of v is east or west, if e is vertical the position of v is north or south If v is not source nor target an error occurs
heading_type dime_orth_plan_undi_graph::position_of_edge_with_respect_to_node | ( | gdtedge | e, | |
gdtnode | v | |||
) | const |
Return the relative position of gdtedge with respect to gdtnode. If v is source or target of e then if e is horizontal the position of e is east or west, if e is vertical the position of e is north or south If v is not source nor target an error occurs
heading_type dime_orth_plan_undi_graph::position_of_node_with_respect_to_node | ( | gdtnode | v1, | |
gdtnode | v2 | |||
) | const |
Return the relative position of first gdtnode with respect to second gdtnode. For this operation there is no necessity that the gdtedge between the two edges exists.
gdtedge dime_orth_plan_undi_graph::find_edge_leaving_node_with_heading | ( | gdtnode | v, | |
heading_type | d | |||
) | const |
Return the gdtedge (possibly NULL_EDGE) that leave gdtnode with heading_type.
gdtnode dime_orth_plan_undi_graph::find_node_reachable_moving_from_node_with_heading | ( | gdtnode | v, | |
heading_type | d | |||
) | const |
return the opposite (possibly NULL_NODE) of the gdtedge returned by find_edge_leaving_node_with_heading(gdtnode, heading_type);
gdtnode dime_orth_plan_undi_graph::find_node_reachable_moving_from_node_with_heading | ( | gdtnode | v, | |
heading_type | d, | |||
gdtedge & | e | |||
) | const |
return the opposite (possibly NULL_NODE) of the gdtedge returned by find_edge_leaving_node_with_heading(gdtnode, heading_type); also store in e the gdtedge returned by the find_edge_leaving_node_with_heading(gdtnode, heading_type)
gdtnode dime_orth_plan_undi_graph::find_node_after_edge_along_heading | ( | gdtedge | e, | |
heading_type | h | |||
) |
return the gdtnode (possibly NULL_NODE) encountered walking from the gdtedge e along the specified heading h
face dime_orth_plan_undi_graph::face_visible_from_node_looking_with_heading | ( | gdtnode | v, | |
heading_type | h | |||
) | const |
return the right face, moving from gdtnode, of the gdtedge returned by find_edge_leaving_node_with_heading(gdtnode, heading_type);
gdt::gdtpoint dime_orth_plan_undi_graph::position_of_node | ( | gdtnode | v | ) | const |
Return the position of gdtnode.
gdt::gdtlist<gdt::gdtpoint> dime_orth_plan_undi_graph::position_of_bends_along_edge | ( | gdtedge | e, | |
gdtnode | v | |||
) | const |
Return the point-list of bend-positions on gdtedge, starting from gdtnode.
slope_type dime_orth_plan_undi_graph::opposite_slope | ( | slope_type | s | ) | const |
Return the opposite slope of slope_type.
slope_type dime_orth_plan_undi_graph::slope_along_heading | ( | heading_type | d | ) | const |
Return the slope corresponding to heading_type.
slope_type dime_orth_plan_undi_graph::slope_of_border_step | ( | border_step | s | ) | const |
Return the slope of border_step.
slope_type dime_orth_plan_undi_graph::slope_of_edge | ( | gdtedge | e | ) | const |
Return the slope of gdtedge.
gdt::gdtlist<gdtnode> dime_orth_plan_undi_graph::nodes_reachable_moving_from_node_with_slope | ( | gdtnode | v, | |
slope_type | slope | |||
) | const |
Return the ordered maximal chain of nodes reachable from gdtnode, moving according to slope_type. If slope is horizontal, nodes are ordered from west to east. If slope is vertical, nodes are ordered from north to sud.
gdt::gdtlist<gdtnode> dime_orth_plan_undi_graph::nodes_reachable_moving_from_node_with_slope | ( | gdtnode | v, | |
slope_type | slope, | |||
gdt::gdtlist< gdtedge > & | edge_chain | |||
) | const |
Return the ordered maximal chain of nodes reachable from gdtnode, moving according to slope_type. If slope is horizontal, nodes are ordered from west to east. If slope is vertical, nodes are ordered from north to sud. Also, with the same ordering, store the edges of the chain in the list edge_chain.
Distance along the border of the face f, moving clockwise from v1 to v2. PRECONDITIONS: v1 and v2 lay on the same face f
Distance along the border of the face f, moving clockwise from v to e. The length of e is not included. PRECONDITIONS: v and e lay on the same face f
Distance along the border of the face f, moving clockwise from e to v. The length of e is not included. PRECONDITIONS: v and e lay on the same face f
Distance along the border of the face f, moving clockwise from e1 to e2. The length of e1 and e2 are not included. PRECONDITIONS: e1 and e2 lay on the same face f
int dime_orth_plan_undi_graph::min_border_distance | ( | gdtnode | v1, | |
gdtnode | v2, | |||
face | f, | |||
bool & | ordered | |||
) | const |
Distance along the border of the face f, moving clockwise or counter-clockwise from v1 to v2. Ordered is true if the min. distance moves from v1 clockwise. PRECONDITIONS: v1 and v2 lay on the same face f
int dime_orth_plan_undi_graph::min_border_distance | ( | gdtnode | v, | |
gdtedge | e, | |||
face | f, | |||
bool & | ordered | |||
) | const |
Distance along the border of the face f, moving clockwise or counter-clockwise from v along e. Ordered is true if the min. distance moves from v clockwise. PRECONDITIONS: v1 and e lay on the same face f
int dime_orth_plan_undi_graph::min_border_distance | ( | gdtedge | e1, | |
gdtedge | e2, | |||
face | f, | |||
bool & | ordered | |||
) | const |
Distance along the border of the face f, moving clockwise or counter-clockwise from e1 to e2. ordered is true if min. distance moves from e1 clockwise. PRECONDITIONS: v1 and v2 lay on the same face f
int dime_orth_plan_undi_graph::inline_distance | ( | gdtnode | v1, | |
gdtnode | v2, | |||
slope_type | slope | |||
) | const |
To be defined.
int dime_orth_plan_undi_graph::traversal_distance | ( | gdtnode | v1, | |
gdtnode | v2, | |||
slope_type | slope | |||
) | const |
To be defined.
angle_type dime_orth_plan_undi_graph::angle_on_node | ( | gdtnode | v, | |
face | f | |||
) | const |
Return the angle on gdtnode in face.
angle_type dime_orth_plan_undi_graph::rotation_around_bend_required_to_change_heading | ( | heading_type | initial, | |
heading_type | final | |||
) | const |
Return the angle rotation around a bend required to change from the first heading to the second one.
static angle_type dime_orth_plan_undi_graph::angle_required_to_change_heading | ( | heading_type | initial, | |
heading_type | final | |||
) | [static] |
Static method. Return the clockwise angle required to switch from the heading "initial" to the heading "final"
void dime_orth_plan_undi_graph::compute_dime_with_expanded_nodes | ( | gdt::gdtnode_array< int > & | w, | |
gdt::gdtnode_array< int > & | h, | |||
dime_orth_plan_undi_graph & | dopug, | |||
gdt::gdtnode_map< gdtnode > & | super_node | |||
) | const |
Compute a dime_orth_plan_undi_graph dopug that has the same shape as the current dime_orth_plan_undi_graph, but such that each gdtnode "v" is represented by a rectangular face with dimension (w[v] x h[v]). Finally, for each vertex "v" of "dopug", "super_node[v]" is the gdtnode of the current dime_orth_plan_undi_graph to which "v" belongs.
PRECONDITIONS: the dime dopug has been linearized, that is it has no bends.
void dime_orth_plan_undi_graph::compute_dime_with_expanded_nodes_and_edges_centered | ( | gdt::gdtnode_array< int > & | w, | |
gdt::gdtnode_array< int > & | h, | |||
dime_orth_plan_undi_graph & | dopug, | |||
gdt::gdtnode_map< gdtnode > & | super_node | |||
) | const |
Compute a dime_orth_plan_undi_graph dopug that has the same shape as the current dime_orth_plan_undi_graph, but such that each gdtnode "v" is represented by a rectangular face with dimension (w[v] x h[v]). All the edges will leave their side at the center. Finally, for each vertex "v" of "dopug", "super_node[v]" is the gdtnode of the current dime_orth_plan_undi_graph to which "v" belongs.
PRECONDITIONS: the dime dopug has been linearized, that is it has no bends.
void dime_orth_plan_undi_graph::compute_dime_with_expanded_nodes_and_pins | ( | const gdt::gdtnode_array< int > & | w, | |
const gdt::gdtnode_array< int > & | h, | |||
dime_orth_plan_undi_graph & | dopug, | |||
gdt::gdtnode_map< gdtnode > & | super_node | |||
) | const |
Compute a dime_orth_plan_undi_graph dopug that has the same shape as the current one, but such that each gdtnode "v" is represented by a rectangular face with dimension w[v] x h[v]. For each vertex "v" of "dopug", "super_node[v]" is the gdtnode of the current dime_orth_plan_undi_graph which "v" belongs to. Values of pin_number fields of border_step structure are used to contraint the distance between the bottom left corner of "v" and the attachment of edges to "v", according to the convention described in the dime_orth_plan_undi.pin_number_of_border_step() method.
PRECONDITIONS: the dime dopug has been linearized, that is it has no bends.
bool dime_orth_plan_undi_graph::edge_is_dummy | ( | gdtedge | ) | const |
Return true if the gdtedge is marked: RM3_ADDED_BY_RECTANGULARIZATION
bool dime_orth_plan_undi_graph::edge_is_real | ( | gdtedge | ) | const |
Return true if the gdtedge is not dummy
bool dime_orth_plan_undi_graph::node_is_dummy | ( | gdtnode | ) | const |
Return true if the gdtnode is marked: RM3_ADDED_BY_RECTANGULARIZATION or RM3_CROSS_ON_REAL_EDGE or RM3_REPLACES_A_BEND or RM3_BEND_NODE
bool dime_orth_plan_undi_graph::node_is_real | ( | gdtnode | ) | const |
Return true if the gdtnode is not dummy
void dime_orth_plan_undi_graph::build_embedded_posets | ( | plan_undi_graph & | pug_v, | |
plan_undi_graph & | pug_h, | |||
gdt::gdtnode_map< gdtnode > & | node_in_pug_v, | |||
gdt::gdtnode_map< gdtnode > & | node_in_pug_h | |||
) |
Build two regular upward planar graphs "pug_v" and "pug_h" corresponding to two embedded posets derived from the orthogonal representation. They are obtained by clustering all horizontal and vertical chains respectively. "node_in_pug_v" indicate the gdtnode-cluster in "pug_v" that corresponds to each gdtnode in "this". "node_in_pug_h" indicate the gdtnode-cluster in "pug_h" that corresponds to each gdtnode in "this".
Create and return a new gdtnode by splitting the gdtedge "e". The position of the new gdtnode will be the middle point of gdtedge "e" if there is free space, else the graph is expanded to make free space. PRECONDITIONS: gdtedge "e" must have no bends.
Reimplemented from orth_plan_undi_graph.
gdtnode dime_orth_plan_undi_graph::new_node | ( | gdtedge | e, | |
gdtnode | v, | |||
int | dist, | |||
int | new_id = AUTO_ID | |||
) |
Create and return a new gdtnode by splitting the gdtedge "e". The new gdtnode is put at distance "dist" from the gdtnode "v". PRECONDITIONS: - gdtedge "e" has no bends and "v" belongs to "e"
Reimplemented from orth_plan_undi_graph.
gdtnode dime_orth_plan_undi_graph::new_node | ( | gdtnode | v, | |
heading_type | dir, | |||
int | dist, | |||
int | new_node_id = AUTO_ID , |
|||
int | new_edge_id = AUTO_ID | |||
) |
Create and return a new gdtnode, by attaching it to the gdtnode "v". A new straight gdtedge is created to connect the new gdtnode and "v". Such gdtedge is incident with "v" in the specified direction "dir", and the new gdtnode has distance "dist" from "v". "dir" should be in {north, south, west, east}. "new_node_id" and "new_edge_id" specify the identifiers of the new gdtnode and the new gdtedge, respectively. PRECONDITIONS: there is not any other gdtedge incident with "v" in the specified direction. WARNINGS: the method does not check if the new gdtedge intersects other edges.
Add a new straight gdtedge between "v" and "w". The two nodes should have either the same x coordinate or the same y coordinate otherwise the error handler is invoked. The new gdtedge is returned. PRECONDITIONS: v and w are vertices of the border of f and v != w
Split face f by adding a new gdtedge between v and w. The new gdtedge is returned. PRECONDITIONS: v and w are vertices of the border of f and v != w
Reimplemented from orth_plan_undi_graph.
gdtedge dime_orth_plan_undi_graph::new_edge | ( | gdtnode | v, | |
gdtedge | ev, | |||
gdtnode | w, | |||
gdtedge | ew, | |||
int | new_id = AUTO_ID | |||
) |
Split face f by adding a new gdtedge between v and w and put it after ev around v and after ew after w. The new gdtedge is returned. PRECONDITIONS: v and w are vertices of the border of f and v != w
Reimplemented from orth_plan_undi_graph.
Delete gdtnode.
Reimplemented from orth_plan_undi_graph.
Delete gdtedge.
Reimplemented from orth_plan_undi_graph.
void dime_orth_plan_undi_graph::attach_nodes_by_chain | ( | gdtnode | v1, | |
gdtnode | v2, | |||
gdt::gdtlist< gdtnode > & | N | |||
) |
attach the two nodes "v1" and "v2", by creating a chain of nodes and edges between them. Namely, if there is a distance equal to 'k' between "v1" and "v2", the chain will have 'k' edges and 'k-1' nodes. The nodes added are returned in the list "N". WARNINGS: "N" is not inizialized by this method PRECONDITIONS: "v1" and "v2" are aligned
Delete the edges incident on "v" and merge them in a single gdtedge, which is returned. PRECONDITIONS: "v" has degree two.
Reimplemented from orth_plan_undi_graph.
Replace the gdtnode "v" with a bend
PRECONDITIONS: "v" has degree two
DEPRECATED: use weld_edges_at_node instead.
Reimplemented from orth_plan_undi_graph.
void dime_orth_plan_undi_graph::replace_bend_with_node | ( | gdtedge | e, | |
gdtnode | v, | |||
int | pos, | |||
gdt::gdtlist< gdtnode > & | N, | |||
gdt::gdtlist< gdtedge > & | E | |||
) |
replace a bend with a gdtnode. Namely, the bend is in position "pos" when walking on gdtedge "e" from gdtnode "v". Return in a list "N" the new gdtnode, and in a list "E" the edges deriving by the splitting of the gdtedge "e". PRECONDITIONS: there is a bend in the specified position
Reimplemented from orth_plan_undi_graph.
void dime_orth_plan_undi_graph::replace_bends_with_nodes | ( | gdtedge | e, | |
gdt::gdtlist< gdtnode > & | N, | |||
gdt::gdtlist< gdtedge > & | E | |||
) |
Replace all the bends of the gdtedge "e" with nodes. Return in a list "N" the new nodes, and in a list "E" the edges deriving by the splitting of the gdtedge "e".
Reimplemented from orth_plan_undi_graph.
void dime_orth_plan_undi_graph::replace_bends_with_nodes | ( | face | f, | |
gdt::gdtlist< gdtnode > & | N, | |||
gdt::gdtlist< gdtedge > & | E | |||
) |
Replace all the bends of the border of the face "f" with nodes. Return in a list "N" the new nodes, and in a list "E" the edges deriving by the splitting of the edges of "f".
Reimplemented from orth_plan_undi_graph.
void dime_orth_plan_undi_graph::replace_bends_with_nodes | ( | gdt::gdtlist< gdtnode > & | N, | |
gdt::gdtlist< gdtedge > & | E | |||
) |
Replace all the bends of the graph with nodes. Return in a list "N" the new nodes, and in a list "E" the edges deriving by the splitting of the edges of the graph.
Reimplemented from orth_plan_undi_graph.
void dime_orth_plan_undi_graph::update_node_and_bend_positions_according_to | ( | dime_orth_plan_undi_graph & | dopug | ) |
Update the coordinates of the nodes and bends of the current graph according to the coordinates of nodes and bends of dopug. PRECONDITIONS: the shape and the gdtnode- and gdtedge-identifiers of dopug are the same as those of the current graph.
void dime_orth_plan_undi_graph::one_dimensional_tieing | ( | const gdt::gdtmap< int, int > & | min, | |
const gdt::gdtmap< int, int > & | max, | |||
const gdt::gdtmap< int, int > & | cost, | |||
slope_type | slp, | |||
unsigned int | min_tieing_dist = 1 | |||
) |
This method consider the edges whose slope is equal to "slp" and minimize their length as much as possible, avoiding overlapping.
The user should specify constraints on the length of the edges that are taken into account during the computation:
min: is a mapping from the ID of an gdtedge to the minimum value of its length.
max: is a mapping from the ID of an gdtedge to the maximum value of its length.
cost: is a mapping from the ID of an gdtedge to the cost that multiply the length of the gdtedge.
The objective function that is minimized is the sum for each gdtedge of the length multiplied for its cost.
Warning No check on the feasibility of the constraints is performed. If no soution can be found, the "error_handler" is invoked during the computation and the execution is interrupted.
min_tieing_dist
is the lower bound (in grid units) to the distance between two objects (nodes ore edges) in the result.
void dime_orth_plan_undi_graph::one_dimensional_tieing_for_expanded_nodes | ( | const gdt::gdtmap< int, int > & | min, | |
const gdt::gdtmap< int, int > & | max, | |||
const gdt::gdtmap< int, int > & | cost, | |||
slope_type | slp, | |||
const gdt::gdtmap< int, int > & | extent, | |||
unsigned int | min_tieing_dist = 1 | |||
) |
This method behave as a one_dimensional_tieing but is able to create "buttons holes" in order to allow appropriate resizing of boxes created with a cycle (expanded nodes).
extent
is a mapping from the id's of the nodes to an integer representing a dimension of the box. That is, if a gdtnode has associated a non zero value the gdtnode is considered to be the left bottom gdtnode of a box deriving from an expanded gdtnode.
When slp
is horizontal the "button hole" is horizontal, between the two vertical side wall of the box. The "button hole" placed at distance zero from the "floor" of the box.
void dime_orth_plan_undi_graph::DD_dynamic_new_edge | ( | gdtnode | v1, | |
gdtnode | v2, | |||
int | cross_cost, | |||
int | bend_cost, | |||
int | length_unit_cost | |||
) |
Insert a new gdtedge from gdtnode v1 to gdtnode v2 preserving the previous shape of the orthogonal representation, and considering the cross_, bend_ and length_unit_cost. Since it is possible to have crosses, they are replaced by dummy_nodes (marked as RM3_CROSS_ON_REAL_EDGE or RM3_CROSS_ON_DUMMY_EDGE)
A new gdtnode, with a corresponding new gdtedge, is attached to the given gdtnode preserving the previous shape of the orthogonal representation.
void dime_orth_plan_undi_graph::remove_all_dummy_nodes_and_edges | ( | ) |
void dime_orth_plan_undi_graph::clear | ( | ) |
Remove all nodes and edges.
Reimplemented from orth_plan_undi_graph.
void dime_orth_plan_undi_graph::steal_from | ( | undi_graph & | ug | ) |
Make *this with the undi_graph ug internal variables and cut these variables from ug. This method is used to make an undi_graph as a dime_orth_plan_undi_graph, manteining the same internal variables. WARNING: ug has an empty body after this method is applied PRECONDITIONS: ug must be connected and with at least one gdtnode
void dime_orth_plan_undi_graph::steal_from | ( | plan_undi_graph & | pug | ) |
Make *this with the plan_undi_graph pug internal variables and cut these variables from pug. This method is used to make a plan_undi_graph as a dime_orth_plan_undi_graph, manteining the same internal variables. WARNING: pug has an empty body after this method is applied
void dime_orth_plan_undi_graph::steal_from | ( | orth_plan_undi_graph & | opug | ) |
Make *this with the orth_plan_undi_graph opug internal variables and cut these variables from opug. This method is used to make a plan_undi_graph as a dime_orth_plan_undi_graph, manteining the same internal variables. WARNING: opug has an empty body after this method is applied
void dime_orth_plan_undi_graph::mirror | ( | dime_orth_plan_undi_graph & | dopug | ) |
Copy all private variables of orth_plan_undi_graph in *this.
void dime_orth_plan_undi_graph::forget | ( | ) |
Cut all private variables in *this.
Reimplemented from orth_plan_undi_graph.
void dime_orth_plan_undi_graph::print | ( | print_mode | mode = BY_FACES , |
|
std::ostream & | os = std::cout | |||
) | const |
Print the graph on ostream os; print_mode can be BY_NODES, BY_EDGE, BY_FACES, COMPLETE.
Reimplemented from orth_plan_undi_graph.
void dime_orth_plan_undi_graph::print | ( | gdtnode | v, | |
std::ostream & | os = std::cout | |||
) | const |
Print gdtnode on ostream os.
Reimplemented from orth_plan_undi_graph.
void dime_orth_plan_undi_graph::print | ( | gdtedge | e, | |
bool | path = false , |
|||
std::ostream & | os = std::cout | |||
) | const |
Print gdtedge on ostream os. If path=true, print also all bend-positions.
void dime_orth_plan_undi_graph::print | ( | face | f, | |
std::ostream & | os = std::cout | |||
) | const |
Print face on ostream os.
Reimplemented from orth_plan_undi_graph.