Open
Graph Drawing
Framework

 v.2012.05
 

PlanarityGrid.h
Go to the documentation of this file.
00001 /*
00002  * $Revision: 2299 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2012-05-07 15:57:08 +0200 (Mon, 07 May 2012) $ 
00007  ***************************************************************/
00008  
00047 #ifdef _MSC_VER
00048 #pragma once
00049 #endif
00050 
00051 #ifndef OGDF_PLANARITYGRID_H
00052 #define OGDF_PLANARITYGRID_H
00053 
00054 
00055 #include <ogdf/internal/energybased/EnergyFunction.h>
00056 #include <ogdf/internal/energybased/UniformGrid.h>
00057 
00058 
00059 namespace ogdf {
00060 
00061 
00062 class PlanarityGrid: public EnergyFunction {
00063 public: 
00064     //initializes data structures to speed up later computations
00065     PlanarityGrid(GraphAttributes &AG);
00066     ~PlanarityGrid();
00067     // computes energy of initial layout and stores it in m_energy
00068     void computeEnergy();
00069 private:
00070     // computes energy of candidate
00071     void compCandEnergy();
00072     // changes internal data if candidate is taken
00073     void internalCandidateTaken();
00074 #ifdef OGDF_DEBUG
00075         virtual void printInternalData() const;
00076 #endif
00077     const GraphAttributes &m_layout; //The current layout
00078     UniformGrid *m_currentGrid; //stores grid for current layout
00079     UniformGrid *m_candidateGrid; //stores grid for candidate layout
00080 }; // class Planarity
00081 
00082 
00083 }// namespace ogdf
00084 
00085 #endif