Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

SolarMerger.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/basic.h>
37 
38 #include <map>
39 #include <vector>
40 
41 namespace ogdf {
42 class MultilevelGraph;
43 
45 
49  struct PathData {
50  explicit PathData(int targetSunParam = 0, double len = 0.0f, int num = 0)
51  : targetSun(targetSunParam), length(len), number(num) { }
52 
53  int targetSun;
54  double length;
55  int number;
56  };
57 
62  NodeArray<int> m_celestial; // 0 = unknown, 1 = sun, 2 = planet, 3 = moon
66  std::map<int, std::map<int, PathData>> m_interSystemPaths;
67 
68  node sunOf(node object);
69  double distanceToSun(node object, MultilevelGraph& MLG);
70  void addPath(node sourceSun, node targetSun, double distance);
71  void findInterSystemPaths(Graph& G, MultilevelGraph& MLG);
72  int calcSystemMass(node v);
73  bool collapseSolarSystem(MultilevelGraph& MLG, node sun, int level);
74  bool buildOneLevel(MultilevelGraph& MLG) override;
75  std::vector<node> selectSuns(MultilevelGraph& MLG);
76 
77 public:
78  explicit SolarMerger(bool simple = false, bool massAsNodeRadius = false);
79 
80  void buildAllLevels(MultilevelGraph& MLG) override;
81 };
82 
83 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::SolarMerger::m_pathDistances
NodeArray< std::vector< PathData > > m_pathDistances
Definition: SolarMerger.h:65
ogdf::SolarMerger::PathData::PathData
PathData(int targetSunParam=0, double len=0.0f, int num=0)
Definition: SolarMerger.h:50
ogdf::SolarMerger
The solar merger for multilevel layout.
Definition: SolarMerger.h:48
ogdf::SolarMerger::m_mass
NodeArray< unsigned int > m_mass
Definition: SolarMerger.h:60
ogdf::MultilevelGraph
Definition: MultilevelGraph.h:69
ogdf::SolarMerger::PathData::length
double length
Definition: SolarMerger.h:54
ogdf::SolarMerger::m_sunSelectionSimple
bool m_sunSelectionSimple
Definition: SolarMerger.h:58
ogdf::SolarMerger::m_radius
NodeArray< double > m_radius
Definition: SolarMerger.h:61
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::SolarMerger::m_distanceToOrbit
NodeArray< double > m_distanceToOrbit
Definition: SolarMerger.h:64
ogdf::MultilevelBuilder
Base class for merger modules.
Definition: MultilevelBuilder.h:43
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::SolarMerger::m_celestial
NodeArray< int > m_celestial
Definition: SolarMerger.h:62
ogdf::SolarMerger::PathData::targetSun
int targetSun
Definition: SolarMerger.h:53
ogdf::SolarMerger::m_interSystemPaths
std::map< int, std::map< int, PathData > > m_interSystemPaths
Definition: SolarMerger.h:66
ogdf::SolarMerger::m_massAsNodeRadius
bool m_massAsNodeRadius
Definition: SolarMerger.h:59
ogdf::SolarMerger::PathData
Definition: SolarMerger.h:49
MultilevelBuilder.h
Declaration of MultilevelBuilder.
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::SolarMerger::PathData::number
int number
Definition: SolarMerger.h:55
ogdf::SolarMerger::m_orbitalCenter
NodeArray< node > m_orbitalCenter
Definition: SolarMerger.h:63