Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanarityGrid.h
Go to the documentation of this file.
1 
36 #pragma once
37 
40 
41 namespace ogdf {
42 namespace davidson_harel {
43 
44 class PlanarityGrid : public EnergyFunction {
45 public:
46  //initializes data structures to speed up later computations
47  explicit PlanarityGrid(GraphAttributes& AG);
49  // computes energy of initial layout and stores it in m_energy
50  void computeEnergy() override;
51 
52 private:
53  // computes energy of candidate
54  void compCandEnergy() override;
55  // changes internal data if candidate is taken
56  void internalCandidateTaken() override;
57 #ifdef OGDF_DEBUG
58  virtual void printInternalData() const override;
59 #endif
60  const GraphAttributes& m_layout; //The current layout
61  UniformGrid* m_currentGrid; //stores grid for current layout
62  UniformGrid* m_candidateGrid; //stores grid for candidate layout
63 };
64 
65 }
66 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:66
ogdf::davidson_harel::PlanarityGrid::PlanarityGrid
PlanarityGrid(GraphAttributes &AG)
ogdf::davidson_harel::PlanarityGrid::m_currentGrid
UniformGrid * m_currentGrid
Definition: PlanarityGrid.h:61
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::PlanarityGrid::printInternalData
virtual void printInternalData() const override
UniformGrid.h
Declaration of class UniformGrid.
EnergyFunction.h
Declares class EnergyFunction...
ogdf::davidson_harel::UniformGrid
Definition: UniformGrid.h:47
ogdf::davidson_harel::PlanarityGrid
Definition: PlanarityGrid.h:44
ogdf::davidson_harel::PlanarityGrid::computeEnergy
void computeEnergy() override
computes energy for the layout at the beginning of the optimization process
ogdf::davidson_harel::PlanarityGrid::m_candidateGrid
UniformGrid * m_candidateGrid
Definition: PlanarityGrid.h:62
ogdf::davidson_harel::EnergyFunction
The interface for energy functions for the Davidson Harel graph drawing method.
Definition: EnergyFunction.h:47
ogdf::davidson_harel::PlanarityGrid::m_layout
const GraphAttributes & m_layout
Definition: PlanarityGrid.h:60