src/lemon/concept/path.h
changeset 1367 a490662291b9
parent 1359 1581f961cfaa
equal deleted inserted replaced
8:02ee7860acb5 9:cbcf60754cdd
    52       class NodeIt;
    52       class NodeIt;
    53       class EdgeIt;
    53       class EdgeIt;
    54 
    54 
    55       /// \param _G The graph in which the path is.
    55       /// \param _G The graph in which the path is.
    56       ///
    56       ///
    57       Path(const Graph &_G) {}
    57       Path(const Graph &) {}
    58 
    58 
    59       /// Length of the path.
    59       /// Length of the path.
    60       int length() const {return 0;}
    60       int length() const {return 0;}
    61       /// Returns whether the path is empty.
    61       /// Returns whether the path is empty.
    62       bool empty() const { return true;}
    62       bool empty() const { return true;}
    84 
    84 
    85       /// \brief The target of an edge.
    85       /// \brief The target of an edge.
    86       ///
    86       ///
    87       /// Returns node iterator pointing to the target node of the
    87       /// Returns node iterator pointing to the target node of the
    88       /// given edge iterator.
    88       /// given edge iterator.
    89       NodeIt target(const EdgeIt& e) const {return INVALID;}
    89       NodeIt target(const EdgeIt&) const {return INVALID;}
    90 
    90 
    91       /// \brief The source of an edge.
    91       /// \brief The source of an edge.
    92       ///
    92       ///
    93       /// Returns node iterator pointing to the source node of the
    93       /// Returns node iterator pointing to the source node of the
    94       /// given edge iterator.
    94       /// given edge iterator.
    95       NodeIt source(const EdgeIt& e) const {return INVALID;}
    95       NodeIt source(const EdgeIt&) const {return INVALID;}
    96 
    96 
    97 
    97 
    98       /* Iterator classes */
    98       /* Iterator classes */
    99 
    99 
   100       /**
   100       /**
   110 	/// Default constructor
   110 	/// Default constructor
   111 	EdgeIt() {}
   111 	EdgeIt() {}
   112 	/// Invalid constructor
   112 	/// Invalid constructor
   113 	EdgeIt(Invalid) {}
   113 	EdgeIt(Invalid) {}
   114 	/// Constructor with starting point
   114 	/// Constructor with starting point
   115 	EdgeIt(const Path &_p) {}
   115 	EdgeIt(const Path &) {}
   116 
   116 
   117 	operator GraphEdge () const {}
   117 	operator GraphEdge () const {}
   118 
   118 
   119 	/// Next edge
   119 	/// Next edge
   120 	EdgeIt& operator++() {return *this;}
   120 	EdgeIt& operator++() {return *this;}
   121 
   121 
   122 	/// Comparison operator
   122 	/// Comparison operator
   123 	bool operator==(const EdgeIt& e) const {return true;}
   123 	bool operator==(const EdgeIt&) const {return true;}
   124 	/// Comparison operator
   124 	/// Comparison operator
   125 	bool operator!=(const EdgeIt& e) const {return true;}
   125 	bool operator!=(const EdgeIt&) const {return true;}
   126 // 	/// Comparison operator
   126 // 	/// Comparison operator
   127 //      /// \todo It is not clear what is the "natural" ordering.
   127 //      /// \todo It is not clear what is the "natural" ordering.
   128 // 	bool operator<(const EdgeIt& e) const {}
   128 // 	bool operator<(const EdgeIt& e) const {}
   129 
   129 
   130       };
   130       };
   142 	/// Default constructor
   142 	/// Default constructor
   143 	NodeIt() {}
   143 	NodeIt() {}
   144 	/// Invalid constructor
   144 	/// Invalid constructor
   145 	NodeIt(Invalid) {}
   145 	NodeIt(Invalid) {}
   146 	/// Constructor with starting point
   146 	/// Constructor with starting point
   147 	NodeIt(const Path &_p) {}
   147 	NodeIt(const Path &) {}
   148 
   148 
   149 	///Conversion to Graph::Node
   149 	///Conversion to Graph::Node
   150 	operator const GraphNode& () const {}
   150 	operator const GraphNode& () const {}
   151 	/// Next node
   151 	/// Next node
   152 	NodeIt& operator++() {return *this;}
   152 	NodeIt& operator++() {return *this;}
   153 
   153 
   154 	/// Comparison operator
   154 	/// Comparison operator
   155 	bool operator==(const NodeIt& e) const {return true;}
   155 	bool operator==(const NodeIt&) const {return true;}
   156 	/// Comparison operator
   156 	/// Comparison operator
   157 	bool operator!=(const NodeIt& e) const {return true;}
   157 	bool operator!=(const NodeIt&) const {return true;}
   158 // 	/// Comparison operator
   158 // 	/// Comparison operator
   159 //      /// \todo It is not clear what is the "natural" ordering.
   159 //      /// \todo It is not clear what is the "natural" ordering.
   160 // 	bool operator<(const NodeIt& e) const {}
   160 // 	bool operator<(const NodeIt& e) const {}
   161 
   161 
   162       };
   162       };
   199 	///Push a new edge to the front of the path
   199 	///Push a new edge to the front of the path
   200 
   200 
   201 	///Push a new edge to the front of the path.
   201 	///Push a new edge to the front of the path.
   202 	///If the path is empty, you \em must call \ref setStartNode() before
   202 	///If the path is empty, you \em must call \ref setStartNode() before
   203 	///the first use of \ref pushFront().
   203 	///the first use of \ref pushFront().
   204 	void pushFront(const GraphEdge& e) {}
   204 	void pushFront(const GraphEdge&) {}
   205 
   205 
   206 	///Push a new edge to the back of the path
   206 	///Push a new edge to the back of the path
   207 
   207 
   208 	///Push a new edge to the back of the path.
   208 	///Push a new edge to the back of the path.
   209 	///If the path is empty, you \em must call \ref setStartNode() before
   209 	///If the path is empty, you \em must call \ref setStartNode() before
   210 	///the first use of \ref pushBack().
   210 	///the first use of \ref pushBack().
   211 	void pushBack(const GraphEdge& e) {}
   211 	void pushBack(const GraphEdge&) {}
   212 
   212 
   213 	///Commit the changes to the path.
   213 	///Commit the changes to the path.
   214 	void commit() {}
   214 	void commit() {}
   215 
   215 
   216 	///Reserve (front) storage for the builder in advance.
   216 	///Reserve (front) storage for the builder in advance.
   217 
   217 
   218 	///If you know a reasonable upper bound on the number of the edges
   218 	///If you know a reasonable upper bound on the number of the edges
   219 	///to add to the front of the path,
   219 	///to add to the front of the path,
   220 	///using this function you may speed up the building.
   220 	///using this function you may speed up the building.
   221 	void reserveFront(size_t r) {}
   221 	void reserveFront(size_t) {}
   222 	///Reserve (back) storage for the builder in advance.
   222 	///Reserve (back) storage for the builder in advance.
   223 
   223 
   224 	///If you know a reasonable upper bound on the number of the edges
   224 	///If you know a reasonable upper bound on the number of the edges
   225 	///to add to the back of the path,
   225 	///to add to the back of the path,
   226 	///using this function you may speed up the building.
   226 	///using this function you may speed up the building.
   227 	void reserveBack(size_t r) {}
   227 	void reserveBack(size_t) {}
   228       };
   228       };
   229     };
   229     };
   230 
   230 
   231   ///@}
   231   ///@}
   232   }
   232   }