src/lemon/full_graph.h
changeset 981 2e34b796d532
parent 977 48962802d168
child 983 3095ff2b5c18
equal deleted inserted replaced
4:ea67ecc4f8b8 5:7dddb88148f0
    16 
    16 
    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>
       
    22 #include <lemon/iterable_graph_extender.h>
    21 #include <lemon/iterable_graph_extender.h>
    23 #include <lemon/alteration_observer_registry.h>
    22 #include <lemon/alteration_observer_registry.h>
    24 #include <lemon/default_map.h>
    23 #include <lemon/default_map.h>
    25 
    24 
    26 #include <lemon/invalid.h>
    25 #include <lemon/invalid.h>
    68 
    67 
    69     /// Maximum node ID.
    68     /// Maximum node ID.
    70     
    69     
    71     /// Maximum node ID.
    70     /// Maximum node ID.
    72     ///\sa id(Node)
    71     ///\sa id(Node)
    73     int maxNodeId() const { return NodeNum-1; }
    72     int maxId(Node = INVALID) const { return NodeNum-1; }
    74     /// Maximum edge ID.
    73     /// Maximum edge ID.
    75     
    74     
    76     /// Maximum edge ID.
    75     /// Maximum edge ID.
    77     ///\sa id(Edge)
    76     ///\sa id(Edge)
    78     int maxEdgeId() const { return EdgeNum-1; }
    77     int maxId(Edge = INVALID) const { return EdgeNum-1; }
    79 
    78 
    80     Node tail(Edge e) const { return e.id % NodeNum; }
    79     Node tail(Edge e) const { return e.id % NodeNum; }
    81     Node head(Edge e) const { return e.id / NodeNum; }
    80     Node head(Edge e) const { return e.id / NodeNum; }
    82 
    81 
    83 
    82 
   186   };
   185   };
   187 
   186 
   188 
   187 
   189   typedef AlterableGraphExtender<FullGraphBase> AlterableFullGraphBase;
   188   typedef AlterableGraphExtender<FullGraphBase> AlterableFullGraphBase;
   190   typedef IterableGraphExtender<AlterableFullGraphBase> IterableFullGraphBase;
   189   typedef IterableGraphExtender<AlterableFullGraphBase> IterableFullGraphBase;
   191   typedef IdMappableGraphExtender<IterableFullGraphBase> IdMappableFullGraphBase;
   190   typedef DefaultMappableGraphExtender<IterableFullGraphBase> MappableFullGraphBase;
   192   typedef DefaultMappableGraphExtender<IdMappableFullGraphBase> MappableFullGraphBase;
       
   193 
   191 
   194   ///A full graph class.
   192   ///A full graph class.
   195 
   193 
   196   ///This is a simple and fast directed full graph implementation.
   194   ///This is a simple and fast directed full graph implementation.
   197   ///It is completely static, so you can neither add nor delete either
   195   ///It is completely static, so you can neither add nor delete either