22 #ifndef DOXYGEN_NOTFOR_DEVEL
23 #ifndef Tulip_PlanarConMap_H
24 #define Tulip_PlanarConMap_H
26 #include <tulip/tuliphash.h>
27 #include <tulip/Face.h>
28 #include <tulip/GraphDecorator.h>
48 class TLP_SCOPE PlanarConMap :
public GraphDecorator {
51 friend class FaceIteratorTest;
52 friend class PlanarConMapTest;
55 friend class FaceIterator;
56 friend class FaceAdjIterator;
57 friend class NodeFaceIterator;
58 friend class EdgeFaceIterator;
60 friend TLP_SCOPE PlanarConMap* computePlanarConMap(Graph* graph);
66 PlanarConMap(Graph* s);
72 virtual ~PlanarConMap();
97 edge addEdgeMap(
const node v,
const node w, Face f,
const edge e1,
const edge e2, Face new_face= Face());
105 Face splitFace(Face,
const node,
const node, node = node());
111 Face splitFace(Face,
const edge);
117 void mergeFaces(Face f, Face g);
125 Iterator<Face>* getFaces();
127 Iterator<Face>* getFacesAdj(
const node);
129 Iterator<node>* getFaceNodes(
const Face);
131 Iterator<edge>* getFaceEdges(
const Face);
137 edge succCycleEdge(
const edge,
const node)
const;
139 edge predCycleEdge(
const edge,
const node)
const;
141 node succCycleNode(
const node,
const node)
const;
143 node predCycleNode(
const node,
const node)
const;
146 unsigned int nbFaces();
148 unsigned int nbFacesNodes(
const Face);
150 unsigned int nbFacesEdges(
const Face);
153 bool containNode(
const Face,
const node) ;
155 bool containEdge(
const Face,
const edge);
160 Face getFaceContaining(
const node,
const node);
162 Face sameFace(
const node,
const node);
176 void delEdgeMap(edge, Face = Face());
178 typedef TLP_HASH_MAP<Face , std::vector<edge> > faceMap;
179 typedef faceMap::value_type faceMapEntry;
180 typedef TLP_HASH_MAP<edge, std::vector<Face> > edgeMap;
181 typedef edgeMap::value_type edgeMapEntry;
182 typedef TLP_HASH_MAP<node, std::vector<Face> > nodeMap;
183 typedef nodeMap::value_type nodeMapEntry;
189 mutable std::vector<Face > faces;
197 TLP_SCOPE PlanarConMap* computePlanarConMap(Graph* graph);
202 TLP_SCOPE std::ostream& operator<< (std::ostream &, tlp::PlanarConMap *);
205 #endif //DOXYGEN_NOTFOR_DEVEL