Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
MAARPacking.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/List.h>
40
41namespace ogdf {
42namespace energybased {
43namespace fmmm {
44
49
50public:
53
61
62private:
63 double area_height;
64 double area_width;
65
66
69
72
77
78
86
87
93
94
101
104
107 double calculate_aspect_ratio_area(double w, double h, double r);
108
114
120
125};
126
127}
128}
129}
Declaration of Fast Multipole Multilevel Method (FM^3) options.
Declaration of doubly linked lists and iterators.
Declaration of class PackingRowInfo.
Priority queue interface wrapping various heaps.
Declaration of class Set.
PreSort
Specifies how connected components are sorted before the packing algorithm is applied.
Definition FMMMOptions.h:80
TipOver
Specifies in which case it is allowed to tip over drawings of connected components.
Definition FMMMOptions.h:73
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
Encapsulates a pointer to a list element.
Definition List.h:103
data structure for packing rectangles within an area of a desired aspect ratio without overlappings; ...
Definition MAARPacking.h:47
void presort_rectangles_by_height(List< Rectangle > &R)
Sorts elemets of R with momotonously dedreasing height.
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...
double area_height
total height of the packing area
Definition MAARPacking.h:63
void presort_rectangles_by_width(List< Rectangle > &R)
Sorts elemets of R with momotonously decreasing width.
double calculate_bounding_rectangles_area(List< Rectangle > &R)
Returns the area of the bounding rectangles in R.
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...
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 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.
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...
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 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...
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...
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_width
total width of the packing area
Definition MAARPacking.h:64
Helping data structure for MAARPacking.
Helping data structure for packing rectangles; The width, height and the position of the down left co...
Definition Rectangle.h:45
Defines a queue for handling prioritized elements.
Declaration of class Rectangle.
int r[]
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.