|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
48 class ClusterGraphAttributes;
49 class GraphAttributes;
299 double getCpuTime() {
return time_total; }
383 void randSeed(
int p) { m_randSeed = ((0 <= p) ? p : 1); }
391 return m_edgeLengthMeasurement;
396 m_edgeLengthMeasurement = elm;
448 void minDistCC(
double x) { m_minDistCC = ((x > 0) ? x : 1); }
508 return m_initialPlacementMult;
513 m_initialPlacementMult = ipm;
541 return m_repulsiveForcesCalculation;
546 m_repulsiveForcesCalculation = rfc;
563 void threshold(
double x) { m_threshold = ((x > 0) ? x : 0.1); }
595 void coolValue(
double x) { m_coolValue = (((x > 0) && (x <= 1)) ? x : 0.99); }
599 return m_initialPlacementForces;
604 m_initialPlacementForces = ipf;
691 m_NMTreeConstruction = rtc;
810 bool running(
int iter,
int max_mult_iter,
double actforcevectorlength);
831 void update_low_level_options_due_to_high_level_options_settings();
919 int componenet_index);
935 double scaling = 1.0;
938 double ratio = width / height;
939 if (ratio < pageRatio()) {
941 scaling = pageRatio() / ratio;
944 scaling = ratio / pageRatio();
947 return width * height * scaling;
976 int get_max_mult_iter(
int act_level,
int max_level,
int node_nr);
1004 void make_initialisations_for_rep_calc_classes(
1011 switch (repulsiveForcesCalculation()) {
1036 double f_attr_scalar(
double d,
double ind_ideal_edge_length);
1052 double max_radius(
int iter) {
return (iter == 1) ? boxlength / 1000 : boxlength / 5; }
1086 double x_min = down_left_corner.
m_x;
1087 double x_max = down_left_corner.
m_x + boxlength;
1088 double y_min = down_left_corner.
m_y;
1089 double y_max = down_left_corner.
m_y + boxlength;
1090 if (force.
m_x < x_min) {
1092 }
else if (force.
m_x > x_max) {
1095 if (force.
m_y < y_min) {
1097 }
else if (force.
m_y > y_max) {
FMMMOptions::StopCriterion stopCriterion() const
Returns the stop criterion.
void fineTuneScalar(double s)
Sets the option fineTuneScalar to s.
DPoint down_left_corner
Holds down left corner of the comput.
void nmSmallCell(FMMMOptions::SmallestCellFinding scf)
Sets the option nmSmallCell to scf.
double m_postStrengthOfRepForces
The strength of repulsive forces during postprocessing.
FMMMOptions::TipOver m_tipOverCCs
Option for tip-over of connected components.
The namespace for all OGDF objects.
Stores additional attributes of a graph (like layout information).
int m_NMParticlesInLeaves
The maximal number of particles in a leaf.
int maxIterFactor() const
Returns the current setting of option maxIterFactor.
void resizeDrawing(bool b)
Sets the option resizeDrawing to b.
double m_threshold
The threshold for the stop criterion.
double m_unitEdgeLength
The unit edge length.
int m_maxIntPosExponent
The option for the used exponent.
int fixedIterations() const
Returns the fixed number of iterations for the stop criterion.
FMMMOptions::EdgeLengthMeasurement edgeLengthMeasurement() const
Returns the current setting of option edgeLengthMeasurement.
Includes declaration of graph class.
@ NMM
Calculation as for new multipole method (fast and accurate).
void galaxyChoice(FMMMOptions::GalaxyChoice gc)
Sets the option galaxyChoice to gc.
void setSingleLevel(bool b)
Sets single level option, no multilevel hierarchy is created if b == true.
FMMMOptions::RepulsiveForcesMethod repulsiveForcesCalculation() const
Returns the current setting of option repulsiveForcesCalculation.
double m_minDistCC
The separation between connected components.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
void deallocate_memory()
Dynamically allocated memory is freed here.
FMMMOptions::QualityVsSpeed qualityVersusSpeed() const
Returns the current setting of option qualityVersusSpeed.
int stepsForRotatingComponents() const
Returns the current setting of option stepsForRotatingComponents.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
void nmPrecision(int p)
Sets the precision for the multipole expansions to p.
PreSort
Specifies how connected components are sorted before the packing algorithm is applied.
FMMMOptions::EdgeLengthMeasurement m_edgeLengthMeasurement
The option for edge length measurement.
Declaration of class EdgeAttributes.
FMMMOptions::StopCriterion m_stopCriterion
The stop criterion.
The fast multipole multilevel layout algorithm.
double max_integer_position
The maximum value for an integer position.
bool adjustPostRepStrengthDynamically() const
Returns the current setting of option adjustPostRepStrengthDynamically.
int m_frGridQuotient
The grid quotient.
FMMMOptions::AllowedPositions allowedPositions() const
Returns the current setting of option allowedPositions.
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.
int frGridQuotient() const
Returns the current setting of option frGridQuotient.
GalaxyChoice
Specifies how sun nodes of galaxies are selected.
FMMMOptions::AllowedPositions m_allowedPositions
The option for allowed positions.
void forceScalingFactor(double f)
Sets the scaling factor for the forces to f.
int maxIntPosExponent() const
Returns the current setting of option maxIntPosExponent.
double resizingScalar() const
Returns the current setting of option resizingScalar.
int fineTuningIterations() const
Returns the number of iterations for fine tuning.
void springStrength(double x)
Sets the strength of the springs to x.
double threshold() const
Returns the threshold for the stop criterion.
double average_ideal_edgelength
Measured from center to center.
Declaration of class NodeAttributes.
void randomTries(int n)
Sets the option randomTries to n.
FMMMOptions::MaxIterChange m_maxIterChange
The option for how to change MaxIterations. If maxIterChange != micConstant, the iterations are decre...
void coolTemperature(bool b)
Sets the option coolTemperature to b.
helping data structure that stores the graphical attributes of a node that are needed for the force-d...
Declaration of interface for layout algorithms (class LayoutModule)
FMMMOptions::PreSort m_presortCCs
The option for presorting connected components.
double springStrength() const
Returns the strength of the springs.
bool resizeDrawing() const
Returns the current setting of option resizeDrawing.
int nmParticlesInLeaves() const
Returns the current setting of option nmParticlesInLeaves.
int nmPrecision() const
Returns the precision p for the p-term multipole expansions.
double boxlength
Holds the length of the quadratic comput.
void frGridQuotient(int p)
Sets the option frGridQuotient to p.
FMMMOptions::InitialPlacementMult m_initialPlacementMult
The option for creating initial placement.
InitialPlacementForces
Specifies how the initial placement is done.
int minGraphSize() const
Returns the current setting of option minGraphSize.
void pageRatio(double r)
Sets the option pageRatio to r.
int m_fineTuningIterations
The number of iterations for fine tuning.
bool m_useHighLevelOptions
The option for using high-level options.
Declaration of class NewMultipoleMethod (NMM).
InitialPlacementMult
Specifies how the initial placement is generated.
double pageRatio() const
Returns the current setting of option pageRatio.
FMMMOptions::InitialPlacementMult initialPlacementMult() const
Returns the current setting of option initialPlacementMult.
double m_coolValue
The value by which forces are decreased.
void fixedIterations(int n)
Sets the fixed number of iterations for the stop criterion to n.
MaxIterChange
Specifies how MaxIterations is changed in subsequent multilevels.
bool m_newInitialPlacement
The option for new initial placement.
double unitEdgeLength() const
Returns the current setting of option unitEdgeLength.
AllowedPositions
Specifies which positions for a node are allowed.
void pageFormat(FMMMOptions::PageFormatType t)
Sets the option pageRatio to t.
bool useHighLevelOptions() const
Returns the current setting of option useHighLevelOptions.
void minGraphSize(int n)
Sets the option minGraphSize to n.
int m_fixedIterations
The fixed number of iterations for the stop criterion.
FMMMOptions::QualityVsSpeed m_qualityVersusSpeed
The option for quality-vs-speed trade-off.
Stores additional attributes of a clustered graph (like layout information).
double m_fineTuneScalar
Parameter for scaling forces during fine tuning.
FMMMOptions::MaxIterChange maxIterChange() const
Returns the current setting of option maxIterChange.
void calculate_approx_repulsive_forces(const Graph &G, NodeArray< NodeAttributes > &A, NodeArray< DPoint > &F_rep)
Grid approximation of rep.forces for each node.
StopCriterion
Specifies the stop criterion.
Helping data structure for packing rectangles; The width, height and the position of the down left co...
int m_randSeed
The random seed.
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.
int m_randomTries
The number of random tries.
FMMMOptions::InitialPlacementForces m_initialPlacementForces
The option for how the initial placement is done.
double m_postSpringStrength
The strength of springs during postprocessing.
FMMMOptions::PreSort presortCCs() const
Returns the current setting of option presortCCs.
FMMMOptions::InitialPlacementForces initialPlacementForces() const
Returns the current setting of option initialPlacementForces.
TipOver
Specifies in which case it is allowed to tip over drawings of connected components.
ForceModel
Specifies the force model.
void maxIterFactor(int f)
Sets the option maxIterFactor to f.
double repForcesStrength() const
Returns the strength of the repulsive forces.
double m_pageRatio
The desired page ratio.
void maxIterChange(FMMMOptions::MaxIterChange mic)
Sets the option maxIterChange to mic.
FMMMOptions::PageFormatType pageFormat() const
Returns the current setting of option pageFormat.
void restrict_force_to_comp_box(DPoint &force)
The force is restricted to have values within the comp.
PageFormatType
Possible page formats.
Declaration of class FruchtermanReingold (computation of forces).
NodeArray< double > radius
Holds the radius of the surrounding circle for each node.
void allowedPositions(FMMMOptions::AllowedPositions ap)
Sets the option allowedPositions to ap.
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 repulsiveForcesCalculation(FMMMOptions::RepulsiveForcesMethod rfc)
Sets the option repulsiveForcesCalculation to rfc.
void newInitialPlacement(bool nip)
Sets the option newInitialPlacement to nip.
FMMMOptions::ReducedTreeConstruction nmTreeConstruction() const
Returns the current setting of option nmTreeConstruction.
void initialPlacementMult(FMMMOptions::InitialPlacementMult ipm)
Sets the option initialPlacementMult to ipm.
void nmTreeConstruction(FMMMOptions::ReducedTreeConstruction rtc)
Sets the option nmTreeConstruction to rtc.
void postSpringStrength(double x)
Sets the strength of the springs in the postprocessing step to x.
void presortCCs(FMMMOptions::PreSort ps)
Sets the option presortCCs to ps.
double m_repForcesStrength
The strength of repulsive forces.
RegisteredArray for nodes, edges and adjEntries of a graph.
void minDistCC(double x)
Sets the minimal distance between connected components to x.
void calculate_exact_repulsive_forces(const Graph &G, NodeArray< NodeAttributes > &A, NodeArray< DPoint > &F_rep)
Calculate exact rep. forces for each node.
Data type for general directed graphs (adjacency list representation).
EdgeLengthMeasurement
Specifies how the length of an edge is measured.
void deallocate_memory_for_rep_calc_classes()
Deallocates dynamically allocated memory of the choosen rep. calculation class.
void coolValue(double x)
Sets the option coolValue to x.
Declaration of class Rectangle.
bool m_resizeDrawing
The option for resizing the drawing.
FMMMOptions::RepulsiveForcesMethod m_repulsiveForcesCalculation
Option for how to calculate repulsive forces.
double m_forceScalingFactor
The scaling factor for the forces.
FMMMOptions::GalaxyChoice m_galaxyChoice
The selection of galaxy nodes.
FMMMOptions::SmallestCellFinding nmSmallCell() const
Returns the current setting of option nmSmallCell.
FMMMOptions::ForceModel m_forceModel
The used force model.
void nmParticlesInLeaves(int n)
Sets the option nmParticlesInLeaves to n.
double move_nodes(float *x, float *y, const uint32_t begin, const uint32_t end, const float *fx, const float *fy, const float t)
double coolValue() const
Returns the current setting of option coolValue.
void delete_all_subGraphs(Graph G_sub[], NodeArray< NodeAttributes > A_sub[], EdgeArray< EdgeAttributes > E_sub[])
Frees dynamically allocated memory for the connected component subgraphs.
helping data structure that stores the graphical attributes of an edge that are needed for the force-...
void init_time()
Sets time_total to zero.
void threshold(double x)
Sets the threshold for the stop criterion to x.
void stopCriterion(FMMMOptions::StopCriterion rsc)
Sets the stop criterion to rsc.
int number_of_components
The number of components of the graph.
void postStrengthOfRepForces(double x)
Sets the strength of the repulsive forces in the postprocessing step to x.
FMMMOptions::ReducedTreeConstruction m_NMTreeConstruction
The option for how to construct reduced bucket quadtree.
int m_stepsForRotatingComponents
The number of rotations.
@ Exact
Exact calculation (slow).
bool newInitialPlacement() const
Returns the current setting of option newInitialPlacement.
bool m_adjustPostRepStrengthDynamically
The option adjustPostRepStrengthDynamically.
energybased::fmmm::FruchtermanReingold FR
Class for repulsive force calculation (Fruchterman, Reingold).
double get_post_rep_force_strength(int n)
Returns the value for the strength of the repulsive forces.
Basic declarations, included by all source files.
SmallestCellFinding
Specifies how to calculate the smallest quadratic cell that surrounds the particles of a node in the ...
int randSeed() const
Returns the seed of the random number generator.
double max_radius(int iter)
Describes the max. radius of a move in one time step, depending on the number of iterations.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
FMMMOptions::SmallestCellFinding m_NMSmallCell
The option for how to calculate smallest quadtratic cells.
void maxIntPosExponent(int e)
Sets the option maxIntPosExponent to e.
void calculate_repulsive_forces(const Graph &G, NodeArray< NodeAttributes > &A, NodeArray< DPoint > &F_rep)
Calculate rep. forces for each node.
void qualityVersusSpeed(FMMMOptions::QualityVsSpeed qvs)
Sets the option qualityVersusSpeed to qvs.
void repForcesStrength(double x)
Sets the strength of the repulsive forces to x.
double time_total
The runtime (=CPU-time) of the algorithm in seconds.
double m_springStrength
The strengths of springs.
bool m_coolTemperature
The option for how to scale forces.
FMMMOptions::TipOver tipOverCCs() const
Returns the current setting of option tipOverCCs.
RepulsiveForcesMethod
Specifies how to calculate repulsive forces.
double cool_factor
Needed for scaling the forces if coolTemperature is true.
double fineTuneScalar() const
Returns the curent setting of option fineTuneScalar.
void tipOverCCs(FMMMOptions::TipOver to)
Sets the option tipOverCCs to to.
double postSpringStrength() const
Returns the strength of the springs in the postprocessing step.
void unitEdgeLength(double x)
Sets the option unitEdgeLength to x.
ReducedTreeConstruction
Specifies how the reduced bucket quadtree is constructed.
int randomTries() const
Returns the current setting of option randomTries.
void useHighLevelOptions(bool uho)
Sets the option useHighLevelOptions to uho.
bool coolTemperature() const
Returns the current setting of option coolTemperature.
QualityVsSpeed
Trade-off between run-time and quality.
int m_minGraphSize
The option for minimal graph size.
void edgeLengthMeasurement(FMMMOptions::EdgeLengthMeasurement elm)
Sets the option edgeLengthMeasurement to elm.
void forceModel(FMMMOptions::ForceModel fm)
Sets the used force model to fm.
double minDistCC() const
Returns the minimal distance between connected components.
int m_maxIterFactor
The factor used for decreasing MaxIterations.
double m_resizingScalar
Parameter for resizing the drawing.
double forceScalingFactor() const
Returns the scaling factor for the forces.
void fineTuningIterations(int n)
Sets the number of iterations for fine tuning to n.
bool m_singleLevel
Option for pure single level.
int m_NMPrecision
The precision for multipole expansions.
FMMMOptions::GalaxyChoice galaxyChoice() const
Returns the current setting of option galaxyChoice.
void resizingScalar(double s)
Sets the option resizingScalar to s.
void stepsForRotatingComponents(int n)
Sets the option stepsForRotatingComponents to n.
void adjustPostRepStrengthDynamically(bool b)
Sets the option adjustPostRepStrengthDynamically to b.
@ GridApproximation
Grid approximation (inaccurate).
energybased::fmmm::NewMultipoleMethod NM
Class for repulsive force calculation.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Interface of general layout algorithms.
Declaration of Fast Multipole Multilevel Method (FM^3) options.