Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

MAARPacking.h
Go to the documentation of this file.
1 
32 #pragma once
33 
38 #include <ogdf/basic/List.h>
40 
41 namespace ogdf {
42 namespace energybased {
43 namespace fmmm {
44 
48 {
50 
51 public:
52 
53  MAARPacking();
54  ~MAARPacking();
55 
61  List<Rectangle>& R,
62  double aspect_ratio,
63  FMMMOptions::PreSort presort,
64  FMMMOptions::TipOver allow_tipping_over,
65  double& aspect_ratio_area,
66  double& bounding_rectangles_area);
67 
68 private:
69 
70 
71  double area_height;
72  double area_width;
73 
74 
77 
80 
85  row_of_rectangle, PQueue&
86  total_width_of_row);
87 
88 
94  ListIterator<Rectangle> rect_item,
95  FMMMOptions::TipOver allow_tipping_over,
96  double aspect_ratio,
97  double& aspect_ratio_area,
98  PQueue& total_width_of_row);
99 
100 
104  <ListIterator
105  <PackingRowInfo> >& row_of_rectangle,ListIterator
106  <PackingRowInfo> B_F_item, PQueue& total_width_of_row);
107 
108 
113  <PackingRowInfo> >&
114  row_of_rectangle,List<ListIterator
115  <Rectangle> >& rectangle_order);
116 
119 
122  double calculate_aspect_ratio_area(double w,double h,double r);
123 
128  allow_tipping_over,double& best_area);
129 
134  allow_tipping_over,PackingRowInfo B_F_row,
135  double& best_area);
136 
141 
142 };
143 
144 }
145 }
146 }
void presort_rectangles_by_height(List< Rectangle > &R)
Sorts elemets of R with momotonously dedreasing height.
Declaration of class PackingRowInfo.
bool better_tipp_rectangle_in_new_row(Rectangle r, double aspect_ratio, FMMMOptions::TipOver allow_tipping_over, double &best_area)
Returns true if the aspect_ratio_area of the acual packing becomes better, when tipping r over bevore...
Helping data structure for MAARPacking.
void export_new_rectangle_positions(List< PackingRowInfo > &P, List< ListIterator< PackingRowInfo > > &row_of_rectangle, List< ListIterator< Rectangle > > &rectangle_order)
The information in P and row_of_rectangle are used to generate the new down left coordinates of the r...
Defines a queue for handling prioritized elements.
void pack_rectangles_using_Best_Fit_strategy(List< Rectangle > &R, double aspect_ratio, FMMMOptions::PreSort presort, FMMMOptions::TipOver allow_tipping_over, double &aspect_ratio_area, double &bounding_rectangles_area)
The rectangles in R are packed using the First Fit tiling stratey (precisely the new down left corner...
PreSort
Specifies how connected components are sorted before the packing algorithm is applied.
Definition: FMMMOptions.h:80
bool better_tipp_rectangle_in_this_row(Rectangle r, double aspect_ratio, FMMMOptions::TipOver allow_tipping_over, PackingRowInfo B_F_row, double &best_area)
Returns true if the aspect_ratio_area of the acual packing becomes better, when tipping r over bevore...
double area_height
total height of the packing area
Definition: MAARPacking.h:71
Declaration of Fast Multipole Multilevel Method (FM^3) options.
TipOver
Specifies in which case it is allowed to tip over drawings of connected components.
Definition: FMMMOptions.h:73
double calculate_bounding_rectangles_area(List< Rectangle > &R)
Returns the area of the bounding rectangles in R.
Doubly linked lists (maintaining the length of the list).
Definition: List.h:39
Declaration of class Rectangle.
double calculate_aspect_ratio_area(double w, double h, double r)
Calculate the aspect ratio area of a rectangle with width w and height h and the given aspect ratio r...
void presort_rectangles_by_width(List< Rectangle > &R)
Sorts elemets of R with momotonously decreasing width.
Priority queue interface wrapping various heaps.
Encapsulates a pointer to a list element.
Definition: List.h:41
Declaration of class Set.
void B_F_insert_rectangle(Rectangle r, List< PackingRowInfo > &P, List< ListIterator< PackingRowInfo > > &row_of_rectangle, ListIterator< PackingRowInfo > B_F_item, PQueue &total_width_of_row)
Inserts r into the row with corresponding ListIterator B_F_item and updates total_width_of_row.
double area_width
total width of the packing area
Definition: MAARPacking.h:72
Rectangle tipp_over(ListIterator< Rectangle > rect_item)
Tipps *rect_item over, by newly calculatting its width, height, and old_dlc values (Coordinates of th...
void B_F_insert_rectangle_in_new_row(Rectangle r, List< PackingRowInfo > &P, List< ListIterator< PackingRowInfo > > &row_of_rectangle, PQueue &total_width_of_row)
Creates a new empty row in P and inserts r into this row (by updating P, row_of_rectangle and total_w...
data structure for packing rectangles within an area of a desired aspect ratio without overlappings; ...
Definition: MAARPacking.h:47
The namespace for all OGDF objects.
Helping data structure for packing rectangles; The width, height and the position of the down left co...
Definition: Rectangle.h:44
ListIterator< PackingRowInfo > find_Best_Fit_insert_position(ListIterator< Rectangle > rect_item, FMMMOptions::TipOver allow_tipping_over, double aspect_ratio, double &aspect_ratio_area, PQueue &total_width_of_row)
Finds the Best Fit insert positions of *rect_item and returns the corresp. ListIterator in P or nullp...
Declaration of doubly linked lists and iterators.