Changes in / [751:f5f260a63a9b:750:b7e3662faf02] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/path.h
r751 r559 1016 1016 /// \brief The source of a path 1017 1017 /// 1018 /// This function returns the source node of the given path. 1019 /// If the path is empty, then it returns \c INVALID. 1018 /// This function returns the source of the given path. 1020 1019 template <typename Digraph, typename Path> 1021 1020 typename Digraph::Node pathSource(const Digraph& digraph, const Path& path) { 1022 return path.empty() ? INVALID :digraph.source(path.front());1021 return digraph.source(path.front()); 1023 1022 } 1024 1023 1025 1024 /// \brief The target of a path 1026 1025 /// 1027 /// This function returns the target node of the given path. 1028 /// If the path is empty, then it returns \c INVALID. 1026 /// This function returns the target of the given path. 1029 1027 template <typename Digraph, typename Path> 1030 1028 typename Digraph::Node pathTarget(const Digraph& digraph, const Path& path) { 1031 return path.empty() ? INVALID :digraph.target(path.back());1029 return digraph.target(path.back()); 1032 1030 } 1033 1031
Note: See TracChangeset
for help on using the changeset viewer.