lemon/concept/sym_graph.h
changeset 1552 5c7f270f8e25
parent 1526 8c14aa8f27a2
equal deleted inserted replaced
1:cea6b27481b3 2:b73ae4d77ec6
    40     /// run properly, of course.
    40     /// run properly, of course.
    41     ///
    41     ///
    42     /// It can be used for checking the interface compatibility,
    42     /// It can be used for checking the interface compatibility,
    43     /// or it can serve as a skeleton of a new symmetric graph structure.
    43     /// or it can serve as a skeleton of a new symmetric graph structure.
    44     /// 
    44     /// 
    45     /// Also, you will find here the full documentation of a certain graph
    45     /// Also, you will find here the full documentation of graph
    46     /// feature, the documentation of a real symmetric graph imlementation
    46     /// features, the documentation of a real symmetric graph imlementation
    47     /// like @ref SymListGraph or
    47     /// like @ref SymListGraph or
    48     /// @ref lemon::SymSmartGraph will just refer to this structure.
    48     /// @ref lemon::SymSmartGraph will just refer to this structure.
    49     class StaticSymGraph
    49     class StaticSymGraph
    50     {
    50     {
    51     public:
    51     public:
    52       /// Defalult constructor.
    52       /// Defalult constructor.
    53 
    53 
    54       /// Default constructor.
    54       /// Default constructor.
    55       ///
    55       ///
    56       StaticSymGraph() { }
    56       StaticSymGraph() { }
    57       ///Copy consructor.
    57       //      ///Copy consructor.
    58 
    58 
    59 //       ///\todo It is not clear, what we expect from a copy constructor.
    59 //       ///\todo It is not clear, what we expect from a copy constructor.
    60 //       ///E.g. How to assign the nodes/edges to each other? What about maps?
    60 //       ///E.g. How to assign the nodes/edges to each other? What about maps?
    61 //       StaticGraph(const StaticGraph& g) { }
    61 //       StaticGraph(const StaticGraph& g) { }
    62 
    62 
    91 	/// same object or both are invalid.
    91 	/// same object or both are invalid.
    92 	bool operator==(Node) const { return true; }
    92 	bool operator==(Node) const { return true; }
    93 
    93 
    94 	/// Inequality operator
    94 	/// Inequality operator
    95 	
    95 	
    96 	/// \sa operator==(Node n)
    96 	/// \sa operator==(Node)
    97 	///
    97 	///
    98 	bool operator!=(Node) const { return true; }
    98 	bool operator!=(Node) const { return true; }
    99 
    99 
   100  	///Comparison operator.
   100  	///Comparison operator.
   101 
   101 
   139 	///
   139 	///
   140 	NodeIt(const StaticSymGraph& g) { }
   140 	NodeIt(const StaticSymGraph& g) { }
   141 	/// Node -> NodeIt conversion.
   141 	/// Node -> NodeIt conversion.
   142 
   142 
   143 	/// Sets the iterator to the node of \c g pointed by the trivial 
   143 	/// Sets the iterator to the node of \c g pointed by the trivial 
   144 	/// iterator n.
   144 	/// iterator \c n.
   145 	/// This feature necessitates that each time we 
   145 	/// This feature necessitates that each time we 
   146 	/// iterate the edge-set, the iteration order is the same.
   146 	/// iterate the node-set, the iteration order is the same.
   147 	NodeIt(const StaticSymGraph& g, const Node& n) { }
   147 	NodeIt(const StaticSymGraph& g, const Node& n) { }
   148 	/// Next node.
   148 	/// Next node.
   149 
   149 
   150 	/// Assign the iterator to the next node.
   150 	/// Assign the iterator to the next node.
   151 	///
   151 	///
   265 	/// Initialize the iterator to be invalid.
   265 	/// Initialize the iterator to be invalid.
   266 	///
   266 	///
   267 	OutEdgeIt(Invalid) { }
   267 	OutEdgeIt(Invalid) { }
   268 	/// This constructor sets the iterator to first outgoing edge.
   268 	/// This constructor sets the iterator to first outgoing edge.
   269     
   269     
   270 	/// This constructor set the iterator to the first outgoing edge of
   270 	/// This constructor sets the iterator to the first outgoing edge of
   271 	/// node
   271 	/// the node
   272 	///@param n the node
   272 	///@param n the node
   273 	///@param g the graph
   273 	///@param g the graph
   274 	OutEdgeIt(const StaticSymGraph& g, const Node& n) { }
   274 	OutEdgeIt(const StaticSymGraph& g, const Node& n) { }
   275 	/// Edge -> OutEdgeIt conversion
   275 	/// Edge -> OutEdgeIt conversion
   276 
   276 
   314 	/// Initialize the iterator to be invalid.
   314 	/// Initialize the iterator to be invalid.
   315 	///
   315 	///
   316 	InEdgeIt(Invalid) { }
   316 	InEdgeIt(Invalid) { }
   317 	/// This constructor sets the iterator to first incoming edge.
   317 	/// This constructor sets the iterator to first incoming edge.
   318     
   318     
   319 	/// This constructor set the iterator to the first incoming edge of
   319 	/// This constructor sets the iterator to the first incoming edge of
   320 	/// node
   320 	/// the node
   321 	///@param n the node
   321 	///@param n the node
   322 	///@param g the graph
   322 	///@param g the graph
   323 	InEdgeIt(const StaticSymGraph& g, const Node& n) { }
   323 	InEdgeIt(const StaticSymGraph& g, const Node& n) { }
   324 	/// Edge -> InEdgeIt conversion
   324 	/// Edge -> InEdgeIt conversion
   325 
   325 
   359 	/// Initialize the iterator to be invalid.
   359 	/// Initialize the iterator to be invalid.
   360 	///
   360 	///
   361 	SymEdgeIt(Invalid) { }
   361 	SymEdgeIt(Invalid) { }
   362 	/// This constructor sets the iterator to first edge.
   362 	/// This constructor sets the iterator to first edge.
   363     
   363     
   364 	/// This constructor set the iterator to the first edge of
   364 	/// This constructor sets the iterator to the first edge of
   365 	/// node
   365 	/// the graph
   366 	///@param g the graph
   366 	///@param g the graph
   367 	SymEdgeIt(const StaticSymGraph& g) { }
   367 	SymEdgeIt(const StaticSymGraph& g) { }
   368 	/// Edge -> EdgeIt conversion
   368 	/// Edge -> EdgeIt conversion
   369 
   369 
   370 	/// Sets the iterator to the value of the trivial iterator \c e.
   370 	/// Sets the iterator to the value of the trivial iterator \c e.
   403 	/// Initialize the iterator to be invalid.
   403 	/// Initialize the iterator to be invalid.
   404 	///
   404 	///
   405 	EdgeIt(Invalid) { }
   405 	EdgeIt(Invalid) { }
   406 	/// This constructor sets the iterator to first edge.
   406 	/// This constructor sets the iterator to first edge.
   407     
   407     
   408 	/// This constructor set the iterator to the first edge of
   408 	/// This constructor sets the iterator to the first edge of
   409 	/// node
   409 	/// the graph
   410 	///@param g the graph
   410 	///@param g the graph
   411 	EdgeIt(const StaticSymGraph& g) { }
   411 	EdgeIt(const StaticSymGraph& g) { }
   412 	/// Edge -> EdgeIt conversion
   412 	/// Edge -> EdgeIt conversion
   413 
   413 
   414 	/// Sets the iterator to the value of the trivial iterator \c e.
   414 	/// Sets the iterator to the value of the trivial iterator \c e.
   587 
   587 
   588 
   588 
   589   
   589   
   590     /// An empty non-static graph class.
   590     /// An empty non-static graph class.
   591 
   591 
   592     /// This class provides everything that \ref StaticGraph
   592     /// This class is an extension of \ref StaticGraph
   593     /// with additional functionality which enables to build a
   593     /// with additional functionality that enables one to build a
   594     /// graph from scratch.
   594     /// graph from scratch.
   595     class ExtendableSymGraph : public StaticSymGraph
   595      class ExtendableSymGraph : public StaticSymGraph
   596     {
   596     {
   597     public:
   597     public:
   598       /// Default constructor.
   598       /// Default constructor.
   599 
   599 
   600       /// Default constructor.
   600       /// Default constructor.
   620       void clear() { }
   620       void clear() { }
   621     };
   621     };
   622 
   622 
   623     /// An empty erasable graph class.
   623     /// An empty erasable graph class.
   624   
   624   
   625     /// This class is an extension of \ref ExtendableGraph. It also makes it
   625     /// This class is an extension of \ref ExtendableGraph. It is also
   626     /// possible to erase edges or nodes.
   626     /// possible to erase edges or nodes in this graph.
   627     class ErasableSymGraph : public ExtendableSymGraph
   627     class ErasableSymGraph : public ExtendableSymGraph
   628     {
   628     {
   629     public:
   629     public:
   630       /// Default constructor.
   630       /// Default constructor.
   631 
   631