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> 47 class TLP_SCOPE PlanarConMap :
public GraphDecorator {
50 friend class FaceIteratorTest;
51 friend class PlanarConMapTest;
54 friend class FaceIterator;
55 friend class FaceAdjIterator;
56 friend class NodeFaceIterator;
57 friend class EdgeFaceIterator;
59 friend TLP_SCOPE PlanarConMap* computePlanarConMap(Graph* graph);
65 PlanarConMap(Graph* s);
71 virtual ~PlanarConMap();
96 edge addEdgeMap(
const node v,
const node w, Face f,
const edge e1,
const edge e2, Face new_face= Face());
104 Face splitFace(Face,
const node,
const node, node = node());
110 Face splitFace(Face,
const edge);
116 void mergeFaces(Face f, Face g);
136 edge succCycleEdge(
const edge,
const node)
const;
138 edge predCycleEdge(
const edge,
const node)
const;
140 node succCycleNode(
const node,
const node)
const;
142 node predCycleNode(
const node,
const node)
const;
145 unsigned int nbFaces();
147 unsigned int nbFacesNodes(
const Face);
149 unsigned int nbFacesEdges(
const Face);
152 bool containNode(
const Face,
const node) ;
154 bool containEdge(
const Face,
const edge);
159 Face getFaceContaining(
const node,
const node);
161 Face sameFace(
const node,
const node);
175 void delEdgeMap(edge, Face = Face());
177 typedef TLP_HASH_MAP<Face , std::vector<edge> > faceMap;
178 typedef faceMap::value_type faceMapEntry;
179 typedef TLP_HASH_MAP<edge, std::vector<Face> > edgeMap;
180 typedef edgeMap::value_type edgeMapEntry;
181 typedef TLP_HASH_MAP<node, std::vector<Face> > nodeMap;
182 typedef nodeMap::value_type nodeMapEntry;
188 mutable std::vector<Face > faces;
196 TLP_SCOPE PlanarConMap* computePlanarConMap(Graph* graph);
201 TLP_SCOPE std::ostream&
operator<< (std::ostream &, tlp::PlanarConMap *);
std::ostream & operator<<(std::ostream &os, const Array< Obj, SIZE > &array)
operator << stream operator to easily print an array, or save it to a file.
Interface for Tulip iterators. Allows basic iteration operations only.