lemon/hypercube_graph.h
changeset 735 853fcddcf282
parent 617 4137ef9aacc6
child 737 9d6c3e8b2421
equal deleted inserted replaced
6:28ebcff69bcb 7:dbeb172eba0b
   280 
   280 
   281   /// \ingroup graphs
   281   /// \ingroup graphs
   282   ///
   282   ///
   283   /// \brief Hypercube graph class
   283   /// \brief Hypercube graph class
   284   ///
   284   ///
   285   /// This class implements a special graph type. The nodes of the graph
   285   /// HypercubeGraph implements a special graph type. The nodes of the
   286   /// are indiced with integers with at most \c dim binary digits.
   286   /// graph are indexed with integers having at most \c dim binary digits.
   287   /// Two nodes are connected in the graph if and only if their indices
   287   /// Two nodes are connected in the graph if and only if their indices
   288   /// differ only on one position in the binary form.
   288   /// differ only on one position in the binary form.
       
   289   /// This class is completely static and it needs constant memory space.
       
   290   /// Thus you can neither add nor delete nodes or edges.
       
   291   ///
       
   292   /// This type fully conforms to the \ref concepts::Graph "Graph concept".
       
   293   /// Most of its member functions and nested classes are documented
       
   294   /// only in the concept class.
   289   ///
   295   ///
   290   /// \note The type of the indices is chosen to \c int for efficiency
   296   /// \note The type of the indices is chosen to \c int for efficiency
   291   /// reasons. Thus the maximum dimension of this implementation is 26
   297   /// reasons. Thus the maximum dimension of this implementation is 26
   292   /// (assuming that the size of \c int is 32 bit).
   298   /// (assuming that the size of \c int is 32 bit).
   293   ///
       
   294   /// This graph type fully conforms to the \ref concepts::Graph
       
   295   /// "Graph concept".
       
   296   class HypercubeGraph : public ExtendedHypercubeGraphBase {
   299   class HypercubeGraph : public ExtendedHypercubeGraphBase {
   297     typedef ExtendedHypercubeGraphBase Parent;
   300     typedef ExtendedHypercubeGraphBase Parent;
   298 
   301 
   299   public:
   302   public:
   300 
   303 
   318     }
   321     }
   319 
   322 
   320     /// \brief The dimension id of an edge.
   323     /// \brief The dimension id of an edge.
   321     ///
   324     ///
   322     /// Gives back the dimension id of the given edge.
   325     /// Gives back the dimension id of the given edge.
   323     /// It is in the [0..dim-1] range.
   326     /// It is in the range <tt>[0..dim-1]</tt>.
   324     int dimension(Edge edge) const {
   327     int dimension(Edge edge) const {
   325       return Parent::dimension(edge);
   328       return Parent::dimension(edge);
   326     }
   329     }
   327 
   330 
   328     /// \brief The dimension id of an arc.
   331     /// \brief The dimension id of an arc.
   329     ///
   332     ///
   330     /// Gives back the dimension id of the given arc.
   333     /// Gives back the dimension id of the given arc.
   331     /// It is in the [0..dim-1] range.
   334     /// It is in the range <tt>[0..dim-1]</tt>.
   332     int dimension(Arc arc) const {
   335     int dimension(Arc arc) const {
   333       return Parent::dimension(arc);
   336       return Parent::dimension(arc);
   334     }
   337     }
   335 
   338 
   336     /// \brief The index of a node.
   339     /// \brief The index of a node.