293 double getCpuTime() {
356 void randSeed(
int p) { m_randSeed = ((0<=p) ? p : 1);}
364 return m_edgeLengthMeasurement;
384 m_maxIntPosExponent = (((e >= 31)&&(e<=51))? e : 31);
400 void pageRatio(
double r) {m_pageRatio = (( r > 0) ? r : 1);}
411 m_stepsForRotatingComponents = ((0<=n) ? n : 0);
424 void minDistCC(
double x) { m_minDistCC = (( x > 0) ? x : 1);}
485 return m_initialPlacementMult;
490 m_initialPlacementMult = ipm;
519 return m_repulsiveForcesCalculation;
524 m_repulsiveForcesCalculation = rfc;
541 void threshold(
double x) {m_threshold = ((x > 0) ? x : 0.1);}
573 void coolValue(
double x) { m_coolValue = (((x >0 )&&(x<=1) )? x : 0.99);}
578 return m_initialPlacementForces;
583 m_initialPlacementForces = ipf;
635 return m_adjustPostRepStrengthDynamically;
640 m_adjustPostRepStrengthDynamically = b;
654 m_postStrengthOfRepForces = ((x > 0)? x : 1);
787 void call_DIVIDE_ET_IMPERA_step(
793 void call_MULTILEVEL_step_for_subGraph(
799 bool running(
int iter,
int max_mult_iter,
double actforcevectorlength);
807 void call_FORCE_CALCULATION_step (
815 void call_POSTPROCESSING_step(
829 void initialize_all_options();
832 void update_low_level_options_due_to_high_level_options_settings();
835 void import_NodeAttributes(
841 void import_EdgeAttributes (
847 void init_ind_ideal_edgelength(
856 void export_NodeAttributes(
867 void make_simple_loopfree(
880 void delete_parallel_edges(
891 void update_edgelength(
901 return min(0.2,400.0/
double(n));
923 void create_maximum_connected_subGraphs(
937 void pack_subGraph_drawings(
943 void calculate_bounding_rectangles_of_components(
952 int componenet_index);
960 void rotate_components_and_calculate_bounding_rectangles(
970 double scaling = 1.0;
973 double ratio = width / height;
974 if (ratio < pageRatio()) {
976 scaling = pageRatio() / ratio;
979 scaling = ratio / pageRatio();
982 return width * height * scaling;
991 void export_node_positions(
1017 int get_max_mult_iter(
int act_level,
int max_level,
int node_nr);
1024 void calculate_forces(
1032 int fine_tuning_step);
1051 void make_initialisations_for_rep_calc_classes(
1062 switch (repulsiveForcesCalculation()) {
1084 void calculate_attractive_forces(
1091 double f_attr_scalar (
double d,
double ind_ideal_edge_length);
1094 void add_attr_rep_forces(
1100 int fine_tuning_step);
1113 return (iter == 1) ? boxlength/1000 : boxlength/5;
1129 void prevent_oscillations(
1137 void init_last_node_movement(
1146 void adapt_drawing_to_ideal_average_edgelength(
1156 double x_min = down_left_corner.
m_x;
1157 double x_max = down_left_corner.
m_x+boxlength;
1158 double y_min = down_left_corner.
m_y;
1159 double y_max = down_left_corner.
m_y+boxlength;
1160 if (force.
m_x < x_min )
1162 else if (force.
m_x > x_max )
1164 if (force.
m_y < y_min )
1166 else if (force.
m_y > y_max )
bool m_useHighLevelOptions
The option for using high-level options.
double time_total
The runtime (=CPU-time) of the algorithm in seconds.
void init_time()
Sets time_total to zero.
void deallocate_memory()
Dynamically allocated memory is freed here.
FMMMOptions::AllowedPositions allowedPositions() const
Returns the current setting of option allowedPositions.
double minDistCC() const
Returns the minimal distance between connected components.
bool resizeDrawing() const
Returns the current setting of option resizeDrawing.
void calculate_repulsive_forces(const Graph &G, NodeArray< NodeAttributes > &A, NodeArray< DPoint > &F_rep)
Calculate rep. forces for each node.
int nmParticlesInLeaves() const
Returns the current setting of option nmParticlesInLeaves.
double move_nodes(float *x, float *y, const uint32_t begin, const uint32_t end, const float *fx, const float *fy, const float t)
bool m_singleLevel
Option for pure single level.
int nmPrecision() const
Returns the precision p for the p-term multipole expansions.
bool newInitialPlacement() const
Returns the current setting of option newInitialPlacement.
int m_maxIntPosExponent
The option for the used exponent.
NUMBER m_y
The y-coordinate.
void resizingScalar(double s)
Sets the option resizingScalar to s.
ForceModel
Specifies the force model.
void useHighLevelOptions(bool uho)
Sets the option useHighLevelOptions to uho.
void setSingleLevel(bool b)
Sets single level option, no multilevel hierarchy is created if b == true.
void galaxyChoice(FMMMOptions::GalaxyChoice gc)
Sets the option galaxyChoice to gc.
FMMMOptions::QualityVsSpeed m_qualityVersusSpeed
The option for quality-vs-speed trade-off.
helping data structure that stores the graphical attributes of a node that are needed for the force-d...
FMMMOptions::SmallestCellFinding m_NMSmallCell
The option for how to calculate smallest quadtratic cells.
double max_radius(int iter)
Describes the max. radius of a move in one time step, depending on the number of iterations.
FMMMOptions::QualityVsSpeed qualityVersusSpeed() const
Returns the current setting of option qualityVersusSpeed.
double m_springStrength
The strengths of springs.
Data type for general directed graphs (adjacency list representation).
RepulsiveForcesMethod
Specifies how to calculate repulsive forces.
Exact calculation (slow).
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
FMMMOptions::InitialPlacementForces m_initialPlacementForces
The option for how the initial placement is done.
double unitEdgeLength() const
Returns the current setting of option unitEdgeLength.
FMMMOptions::StopCriterion stopCriterion() const
Returns the stop criterion.
double forceScalingFactor() const
Returns the scaling factor for the forces.
int m_NMPrecision
The precision for multipole expansions.
void fineTuningIterations(int n)
Sets the number of iterations for fine tuning to n.
double resizingScalar() const
Returns the current setting of option resizingScalar.
FMMMOptions::GalaxyChoice galaxyChoice() const
Returns the current setting of option galaxyChoice.
void springStrength(double x)
Sets the strength of the springs to x.
double max_integer_position
The maximum value for an integer position.
void frGridQuotient(int p)
Sets the option frGridQuotient to p.
int fixedIterations() const
Returns the fixed number of iterations for the stop criterion.
int m_fixedIterations
The fixed number of iterations for the stop criterion.
double threshold() const
Returns the threshold for the stop criterion.
int randomTries() const
Returns the current setting of option randomTries.
void calculate_approx_repulsive_forces(const Graph &G, NodeArray< NodeAttributes > &A, NodeArray< DPoint > &F_rep)
Grid approximation of rep.forces for each node.
double m_minDistCC
The separation between connected components.
InitialPlacementForces
Specifies how the initial placement is done.
bool coolTemperature() const
Returns the current setting of option coolTemperature.
int m_minGraphSize
The option for minimal graph size.
StopCriterion
Specifies the stop criterion.
Declaration of class NewMultipoleMethod (NMM).
void forceModel(FMMMOptions::ForceModel fm)
Sets the used force model to fm.
NUMBER m_x
The x-coordinate.
double springStrength() const
Returns the strength of the springs.
FMMMOptions::ReducedTreeConstruction nmTreeConstruction() const
Returns the current setting of option nmTreeConstruction.
FMMMOptions::PreSort m_presortCCs
The option for presorting connected components.
double m_coolValue
The value by which forces are decreased.
FMMMOptions::TipOver m_tipOverCCs
Option for tip-over of connected components.
FMMMOptions::EdgeLengthMeasurement m_edgeLengthMeasurement
The option for edge length measurement.
double m_repForcesStrength
The strength of repulsive forces.
FMMMOptions::InitialPlacementMult m_initialPlacementMult
The option for creating initial placement.
double boxlength
Holds the length of the quadratic comput.
double postStrengthOfRepForces() const
Returns the strength of the repulsive forces in the postprocessing step.
void initialPlacementForces(FMMMOptions::InitialPlacementForces ipf)
Sets the option initialPlacementForces to ipf.
FMMMOptions::GalaxyChoice m_galaxyChoice
The selection of galaxy nodes.
double m_fineTuneScalar
Parameter for scaling forces during fine tuning.
int stepsForRotatingComponents() const
Returns the current setting of option stepsForRotatingComponents.
double pageRatio() const
Returns the current setting of option pageRatio.
ReducedTreeConstruction
Specifies how the reduced bucket quadtree is constructed.
QualityVsSpeed
Trade-off between run-time and quality.
double calculate_area(double width, double height, int comp_nr)
Returns the area (aspect ratio area) of a rectangle with width w and height h if comp_nr > 1 ( comp_n...
void delete_all_subGraphs(Graph G_sub[], NodeArray< NodeAttributes > A_sub[], EdgeArray< EdgeAttributes > E_sub[])
Frees dynamically allocated memory for the connected component subgraphs.
FMMMOptions::InitialPlacementMult initialPlacementMult() const
Returns the current setting of option initialPlacementMult.
int m_randomTries
The number of random tries.
bool m_newInitialPlacement
The option for new initial placement.
PreSort
Specifies how connected components are sorted before the packing algorithm is applied.
void nmSmallCell(FMMMOptions::SmallestCellFinding scf)
Sets the option nmSmallCell to scf.
void nmTreeConstruction(FMMMOptions::ReducedTreeConstruction rtc)
Sets the option nmTreeConstruction to rtc.
void threshold(double x)
Sets the threshold for the stop criterion to x.
void presortCCs(FMMMOptions::PreSort ps)
Sets the option presortCCs to ps.
FMMMOptions::StopCriterion m_stopCriterion
The stop criterion.
void coolTemperature(bool b)
Sets the option coolTemperature to b.
void pageRatio(double r)
Sets the option pageRatio to r.
int m_stepsForRotatingComponents
The number of rotations.
GalaxyChoice
Specifies how sun nodes of galaxies are selected.
int frGridQuotient() const
Returns the current setting of option frGridQuotient.
FMMMOptions::PageFormatType pageFormat() const
Returns the current setting of option pageFormat.
double m_pageRatio
The desired page ratio.
void restrict_force_to_comp_box(DPoint &force)
The force is restricted to have values within the comp.
FMMMOptions::SmallestCellFinding nmSmallCell() const
Returns the current setting of option nmSmallCell.
The fast multipole multilevel layout algorithm.
void repulsiveForcesCalculation(FMMMOptions::RepulsiveForcesMethod rfc)
Sets the option repulsiveForcesCalculation to rfc.
FMMMOptions::PreSort presortCCs() const
Returns the current setting of option presortCCs.
TipOver
Specifies in which case it is allowed to tip over drawings of connected components.
void postSpringStrength(double x)
Sets the strength of the springs in the postprocessing step to x.
int m_fineTuningIterations
The number of iterations for fine tuning.
void calculate_exact_repulsive_forces(const Graph &G, NodeArray< NodeAttributes > &A, NodeArray< DPoint > &F_rep)
Calculate exact rep. forces for each node.
bool adjustPostRepStrengthDynamically() const
Returns the current setting of option adjustPostRepStrengthDynamically.
bool m_resizeDrawing
The option for resizing the drawing.
double postSpringStrength() const
Returns the strength of the springs in the postprocessing step.
PageFormatType
Possible page formats.
Stores additional attributes of a graph (like layout information).
FMMMOptions::AllowedPositions m_allowedPositions
The option for allowed positions.
FMMMOptions::InitialPlacementForces initialPlacementForces() const
Returns the current setting of option initialPlacementForces.
int maxIntPosExponent() const
Returns the current setting of option maxIntPosExponent.
double coolValue() const
Returns the current setting of option coolValue.
EdgeLengthMeasurement
Specifies how the length of an edge is measured.
void minGraphSize(int n)
Sets the option minGraphSize to n.
void maxIterChange(FMMMOptions::MaxIterChange mic)
Sets the option maxIterChange to mic.
Declaration of class Rectangle.
void stopCriterion(FMMMOptions::StopCriterion rsc)
Sets the stop criterion to rsc.
int minGraphSize() const
Returns the current setting of option minGraphSize.
void randomTries(int n)
Sets the option randomTries to n.
FMMMOptions::MaxIterChange maxIterChange() const
Returns the current setting of option maxIterChange.
FMMMOptions::MaxIterChange m_maxIterChange
The option for how to change MaxIterations. If maxIterChange != micConstant, the iterations are decre...
NodeArray< double > radius
Holds the radius of the surrounding circle for each node.
double m_resizingScalar
Parameter for resizing the drawing.
double fineTuneScalar() const
Returns the curent setting of option fineTuneScalar.
Stores additional attributes of a clustered graph (like layout information).
void calculate_repulsive_forces(Graph &G, NodeArray< NodeAttributes > &A, NodeArray< DPoint > &F_rep)
Calculates repulsive forces for each node.
FMMMOptions::PageFormatType m_pageFormat
The option for the page format.
void initialPlacementMult(FMMMOptions::InitialPlacementMult ipm)
Sets the option initialPlacementMult to ipm.
double m_forceScalingFactor
The scaling factor for the forces.
Declaration of interface for layout algorithms (class LayoutModule)
void nmParticlesInLeaves(int n)
Sets the option nmParticlesInLeaves to n.
void minDistCC(double x)
Sets the minimal distance between connected components to x.
bool useHighLevelOptions() const
Returns the current setting of option useHighLevelOptions.
void pageFormat(FMMMOptions::PageFormatType t)
Sets the option pageRatio to t.
void maxIntPosExponent(int e)
Sets the option maxIntPosExponent to e.
double repForcesStrength() const
Returns the strength of the repulsive forces.
bool m_coolTemperature
The option for how to scale forces.
Interface of general layout algorithms.
void fineTuneScalar(double s)
Sets the option fineTuneScalar to s.
double cool_factor
Needed for scaling the forces if coolTemperature is true.
int m_NMParticlesInLeaves
The maximal number of particles in a leaf.
double m_threshold
The threshold for the stop criterion.
AllowedPositions
Specifies which positions for a node are allowed.
int m_randSeed
The random seed.
Declares ClusterGraphAttributes, an extension of class GraphAttributes, to store clustergraph layout ...
void fixedIterations(int n)
Sets the fixed number of iterations for the stop criterion to n.
Includes declaration of graph class.
FMMMOptions::ReducedTreeConstruction m_NMTreeConstruction
The option for how to construct reduced bucket quadtree.
int randSeed() const
Returns the seed of the random number generator.
void qualityVersusSpeed(FMMMOptions::QualityVsSpeed qvs)
Sets the option qualityVersusSpeed to qvs.
void coolValue(double x)
Sets the option coolValue to x.
Grid approximation (inaccurate).
bool m_adjustPostRepStrengthDynamically
The option adjustPostRepStrengthDynamically.
DPoint down_left_corner
Holds down left corner of the comput.
MaxIterChange
Specifies how MaxIterations is changed in subsequent multilevels.
int m_frGridQuotient
The grid quotient.
void newInitialPlacement(bool nip)
Sets the option newInitialPlacement to nip.
double m_postSpringStrength
The strength of springs during postprocessing.
void adjustPostRepStrengthDynamically(bool b)
Sets the option adjustPostRepStrengthDynamically to b.
void stepsForRotatingComponents(int n)
Sets the option stepsForRotatingComponents to n.
FMMMOptions::EdgeLengthMeasurement edgeLengthMeasurement() const
Returns the current setting of option edgeLengthMeasurement.
void unitEdgeLength(double x)
Sets the option unitEdgeLength to x.
void postStrengthOfRepForces(double x)
Sets the strength of the repulsive forces in the postprocessing step to x.
helping data structure that stores the graphical attributes of an edge that are needed for the force-...
int number_of_components
The number of components of the graph.
FMMMOptions::TipOver tipOverCCs() const
Returns the current setting of option tipOverCCs.
void maxIterFactor(int f)
Sets the option maxIterFactor to f.
void edgeLengthMeasurement(FMMMOptions::EdgeLengthMeasurement elm)
Sets the option edgeLengthMeasurement to elm.
The namespace for all OGDF objects.
Helping data structure for packing rectangles; The width, height and the position of the down left co...
void nmPrecision(int p)
Sets the precision for the multipole expansions to p.
Declaration of classes DPoint, DPolyline, DLine, DRect, DIntersectableRect, DScaler.
FMMMOptions::RepulsiveForcesMethod m_repulsiveForcesCalculation
Option for how to calculate repulsive forces.
int m_maxIterFactor
The factor used for decreasing MaxIterations.
energybased::fmmm::FruchtermanReingold FR
Class for repulsive force calculation (Fruchterman, Reingold).
double m_postStrengthOfRepForces
The strength of repulsive forces during postprocessing.
void allowedPositions(FMMMOptions::AllowedPositions ap)
Sets the option allowedPositions to ap.
double m_unitEdgeLength
The unit edge length.
InitialPlacementMult
Specifies how the initial placement is generated.
SmallestCellFinding
Specifies how to calculate the smallest quadratic cell that surrounds the particles of a node in the ...
FMMMOptions::RepulsiveForcesMethod repulsiveForcesCalculation() const
Returns the current setting of option repulsiveForcesCalculation.
void deallocate_memory_for_rep_calc_classes()
Deallocates dynamically allocated memory of the choosen rep. calculation class.
void forceScalingFactor(double f)
Sets the scaling factor for the forces to f.
Calculation as for new multipole method (fast and accurate).
int fineTuningIterations() const
Returns the number of iterations for fine tuning.
energybased::fmmm::NewMultipoleMethod NM
Class for repulsive force calculation.
void tipOverCCs(FMMMOptions::TipOver to)
Sets the option tipOverCCs to to.
FMMMOptions::ForceModel m_forceModel
The used force model.
double average_ideal_edgelength
Measured from center to center.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
double get_post_rep_force_strength(int n)
Returns the value for the strength of the repulsive forces.
int maxIterFactor() const
Returns the current setting of option maxIterFactor.
void resizeDrawing(bool b)
Sets the option resizeDrawing to b.
void repForcesStrength(double x)
Sets the strength of the repulsive forces to x.