21 #ifndef Tulip_PlanarConMap_H 22 #define Tulip_PlanarConMap_H 25 #include <tulip/tuliphash.h> 26 #include <tulip/Face.h> 27 #include <tulip/GraphDecorator.h> 45 class TLP_SCOPE PlanarConMap :
public GraphDecorator {
48 friend class FaceIteratorTest;
49 friend class PlanarConMapTest;
51 friend class FaceIterator;
52 friend class FaceAdjIterator;
53 friend class NodeFaceIterator;
54 friend class EdgeFaceIterator;
56 friend TLP_SCOPE PlanarConMap *computePlanarConMap(Graph *graph);
62 PlanarConMap(Graph *s);
68 void clear()
override;
88 edge addEdgeMap(
const node v,
const node w, Face f,
const edge e1,
const edge e2,
89 Face new_face = Face());
97 Face splitFace(Face,
const node,
const node, node = node());
103 Face splitFace(Face,
const edge);
109 void mergeFaces(Face f, Face g);
116 Iterator<Face> *getFaces();
118 Iterator<Face> *getFacesAdj(
const node);
120 Iterator<node> *getFaceNodes(
const Face);
122 Iterator<edge> *getFaceEdges(
const Face);
128 edge succCycleEdge(
const edge,
const node)
const;
130 edge predCycleEdge(
const edge,
const node)
const;
132 node succCycleNode(
const node,
const node)
const;
134 node predCycleNode(
const node,
const node)
const;
137 unsigned int nbFaces();
139 unsigned int nbFacesNodes(
const Face);
141 unsigned int nbFacesEdges(
const Face);
144 bool containNode(
const Face,
const node);
146 bool containEdge(
const Face,
const edge);
151 Face getFaceContaining(
const node,
const node);
153 Face sameFace(
const node,
const node);
165 void delEdgeMap(edge, Face = Face());
167 typedef TLP_HASH_MAP<Face, std::vector<edge>> faceMap;
168 typedef faceMap::value_type faceMapEntry;
169 typedef TLP_HASH_MAP<edge, std::vector<Face>> edgeMap;
170 typedef edgeMap::value_type edgeMapEntry;
171 typedef TLP_HASH_MAP<node, std::vector<Face>> nodeMap;
172 typedef nodeMap::value_type nodeMapEntry;
178 mutable std::vector<Face> faces;
185 TLP_SCOPE PlanarConMap *computePlanarConMap(Graph *graph);
189 TLP_SCOPE std::ostream &
operator<<(std::ostream &, tlp::PlanarConMap *);
std::ostream & operator<<(std::ostream &os, const Array< T, N > &array)
operator << stream operator to easily print an array, or save it to a file.