Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanarityGrid.h
Go to the documentation of this file.
1 
36 #pragma once
37 
38 #include <ogdf/basic/basic.h>
40 
41 namespace ogdf::davidson_harel {
42 class UniformGrid;
43 } // namespace ogdf::davidson_harel
44 
45 namespace ogdf {
46 class GraphAttributes;
47 
48 namespace davidson_harel {
49 
50 class PlanarityGrid : public EnergyFunction {
51 public:
52  //initializes data structures to speed up later computations
53  explicit PlanarityGrid(GraphAttributes& AG);
55  // computes energy of initial layout and stores it in m_energy
56  void computeEnergy() override;
57 
58 private:
59  // computes energy of candidate
60  void compCandEnergy() override;
61  // changes internal data if candidate is taken
62  void internalCandidateTaken() override;
63 #ifdef OGDF_DEBUG
64  virtual void printInternalData() const override;
65 #endif
66  const GraphAttributes& m_layout; //The current layout
67  UniformGrid* m_currentGrid; //stores grid for current layout
68  UniformGrid* m_candidateGrid; //stores grid for candidate layout
69 };
70 
71 }
72 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:72
ogdf::davidson_harel::PlanarityGrid::PlanarityGrid
PlanarityGrid(GraphAttributes &AG)
ogdf::davidson_harel::PlanarityGrid::m_currentGrid
UniformGrid * m_currentGrid
Definition: PlanarityGrid.h:67
ogdf::davidson_harel::PlanarityGrid::internalCandidateTaken
void internalCandidateTaken() override
changes the data of a specific energy function if the candidate was taken
ogdf::davidson_harel::PlanarityGrid::compCandEnergy
void compCandEnergy() override
computes the energy if m_testNode changes position to m_testX and m_testY, sets the value of m_candid...
ogdf::davidson_harel::PlanarityGrid::~PlanarityGrid
~PlanarityGrid()
ogdf::davidson_harel
Definition: Attraction.h:41
ogdf::davidson_harel::PlanarityGrid::printInternalData
virtual void printInternalData() const override
EnergyFunction.h
Declares class EnergyFunction...
ogdf::davidson_harel::UniformGrid
Definition: UniformGrid.h:58
ogdf::davidson_harel::PlanarityGrid
Definition: PlanarityGrid.h:50
ogdf::davidson_harel::PlanarityGrid::computeEnergy
void computeEnergy() override
computes energy for the layout at the beginning of the optimization process
basic.h
Basic declarations, included by all source files.
ogdf::davidson_harel::PlanarityGrid::m_candidateGrid
UniformGrid * m_candidateGrid
Definition: PlanarityGrid.h:68
ogdf::davidson_harel::EnergyFunction
The interface for energy functions for the Davidson Harel graph drawing method.
Definition: EnergyFunction.h:52
ogdf::davidson_harel::PlanarityGrid::m_layout
const GraphAttributes & m_layout
Definition: PlanarityGrid.h:66