src/lemon/full_graph.h
changeset 978 175cf8c3a994
parent 959 c80ef5912903
child 980 0f1044b7a3af
equal deleted inserted replaced
3:9edf74d856a4 4:ea67ecc4f8b8
    17 #ifndef LEMON_FULL_GRAPH_H
    17 #ifndef LEMON_FULL_GRAPH_H
    18 #define LEMON_FULL_GRAPH_H
    18 #define LEMON_FULL_GRAPH_H
    19 
    19 
    20 
    20 
    21 #include <lemon/idmappable_graph_extender.h>
    21 #include <lemon/idmappable_graph_extender.h>
    22 
       
    23 #include <lemon/iterable_graph_extender.h>
    22 #include <lemon/iterable_graph_extender.h>
    24 
       
    25 #include <lemon/alteration_observer_registry.h>
    23 #include <lemon/alteration_observer_registry.h>
    26 #include <lemon/default_map.h>
    24 #include <lemon/default_map.h>
       
    25 
       
    26 #include <lemon/invalid.h>
       
    27 #include <lemon/utility.h>
       
    28 
    27 
    29 
    28 ///\ingroup graphs
    30 ///\ingroup graphs
    29 ///\file
    31 ///\file
    30 ///\brief FullGraph and SymFullGraph classes.
    32 ///\brief FullGraph and SymFullGraph classes.
    31 
    33 
    32 
       
    33 #include <lemon/invalid.h>
       
    34 
    34 
    35 namespace lemon {
    35 namespace lemon {
    36 
    36 
    37 /// \addtogroup graphs
    37 /// \addtogroup graphs
    38 /// @{
    38 /// @{
    56     void construct(int n) { NodeNum = n; EdgeNum = n * n; }
    56     void construct(int n) { NodeNum = n; EdgeNum = n * n; }
    57     ///
    57     ///
    58     //    FullGraphBase(const FullGraphBase &_g)
    58     //    FullGraphBase(const FullGraphBase &_g)
    59     //      : NodeNum(_g.nodeNum()), EdgeNum(NodeNum*NodeNum) { }
    59     //      : NodeNum(_g.nodeNum()), EdgeNum(NodeNum*NodeNum) { }
    60     
    60     
       
    61     typedef True NodeNumTag;
       
    62     typedef True EdgeNumTag;
       
    63 
    61     ///Number of nodes.
    64     ///Number of nodes.
    62     int nodeNum() const { return NodeNum; }
    65     int nodeNum() const { return NodeNum; }
    63     ///Number of edges.
    66     ///Number of edges.
    64     int edgeNum() const { return EdgeNum; }
    67     int edgeNum() const { return EdgeNum; }
    65 
    68 
   204   public:
   207   public:
   205 
   208 
   206     FullGraph(int n) { construct(n); }
   209     FullGraph(int n) { construct(n); }
   207   };
   210   };
   208 
   211 
   209   template <>
       
   210   int countNodes<FullGraph>(const FullGraph& graph) {
       
   211     return graph.nodeNum();
       
   212   }
       
   213 
       
   214   template <>
       
   215   int countEdges<FullGraph>(const FullGraph& graph) {
       
   216     return graph.edgeNum();
       
   217   }
       
   218 
       
   219   /// @}  
   212   /// @}  
   220 
   213 
   221 } //namespace lemon
   214 } //namespace lemon
   222 
   215 
   223 
   216 
   224 
       
   225 
       
   226 #endif //LEMON_FULL_GRAPH_H
   217 #endif //LEMON_FULL_GRAPH_H