Advertisement
Guest User

Untitled

a guest
Feb 19th, 2011
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.95 KB | None | 0 0
  1. template <class OutEdgeList,
  2.           class VertexList,
  3.           class Directed,
  4.           class VertexProperties,
  5.           class EdgeProperties,
  6.           class FaceProperties,
  7.           class GraphProperties,
  8.           class EdgeList
  9.           >
  10. class HEDIGraph : public boost::adjacency_list< OutEdgeList,           // out-edges stored in a std::list
  11.                                                 VertexList,            // vertex set stored here
  12.                                                 Directed,              // bidirectional graph.
  13.                                                 VertexProperties,      // vertex properties
  14.                                                 EdgeProperties,        // edge properties
  15.                                                 GraphProperties,        
  16.                                                 EdgeList
  17.                                                 >
  18. {
  19.     public:
  20.         typedef unsigned int HEFace;
  21.         typedef boost::adjacency_list< OutEdgeList,            
  22.                                                 VertexList,            
  23.                                                 Directed,  
  24.                                                 VertexProperties,            
  25.                                                 EdgeProperties,                
  26.                                                 GraphProperties,
  27.                                                 EdgeList
  28.                                                 > BGLGraph;
  29.         /// use base class operator[] for vertex and edge properties
  30.         using BGLGraph::operator[];
  31.         /// operator[] to access face properties
  32.         FaceProperties& operator[](HEFace f)  {
  33.             return faces[f];
  34.         }
  35.         /// const operator[] for accessing face properties
  36.         const FaceProperties& operator[](HEFace f) const  {
  37.             return faces[f];
  38.         }
  39. //DATA
  40.         std::vector<FaceProperties> faces;
  41. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement