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 00043 #ifdef _MSC_VER 00044 #pragma once 00045 #endif 00046 00047 00048 #ifndef OGDF_PLANAR_PQTREE_H 00049 #define OGDF_PLANAR_PQTREE_H 00050 00051 00052 00053 #include <ogdf/internal/planarity/PQTree.h> 00054 #include <ogdf/basic/Graph.h> 00055 #include <ogdf/basic/SList.h> 00056 #include <ogdf/internal/planarity/PlanarLeafKey.h> 00057 #include <ogdf/internal/planarity/EmbedKey.h> 00058 00059 00060 namespace ogdf { 00061 00062 class PlanarPQTree: public PQTree<edge,indInfo*,bool> { 00063 00064 public: 00065 00066 PlanarPQTree() : PQTree<edge,indInfo*,bool>() { } 00067 00068 virtual ~PlanarPQTree() { } 00069 00070 // Does a clean up after a reduction 00071 virtual void emptyAllPertinentNodes(); 00072 00073 // Initializes a new PQ-tree with a set of leaves. 00074 virtual int Initialize(SListPure<PlanarLeafKey<indInfo*>*> &leafKeys); 00075 00076 // Replaces the pertinent subtree by a set of new leaves. 00077 void ReplaceRoot(SListPure<PlanarLeafKey<indInfo*>*> &leafKeys); 00078 00079 // Reduces a set of leaves. 00080 virtual bool Reduction(SListPure<PlanarLeafKey<indInfo*>*> &leafKeys); 00081 00082 private: 00083 00084 // Replaces a pertinet subtree by a set of new leaves if the root 00085 // is full. 00086 void ReplaceFullRoot(SListPure<PlanarLeafKey<indInfo*>*> &leafKeys); 00087 00088 // Replaces a pertinet subtree by a set of new leaves if the root 00089 // is partial. 00090 void ReplacePartialRoot(SListPure<PlanarLeafKey<indInfo*>*> &leafKeys); 00091 00092 }; 00093 00094 } 00095 00096 #endif