0
14
0
8
12
8
10
4
4
| ... | ... |
@@ -34,13 +34,13 @@ |
| 34 | 34 |
|
| 35 | 35 |
|
| 36 | 36 |
|
| 37 | 37 |
///Default traits class of Bfs class. |
| 38 | 38 |
|
| 39 | 39 |
///Default traits class of Bfs class. |
| 40 |
///\ |
|
| 40 |
///\tparam GR Digraph type. |
|
| 41 | 41 |
template<class GR> |
| 42 | 42 |
struct BfsDefaultTraits |
| 43 | 43 |
{
|
| 44 | 44 |
///The digraph type the algorithm runs on. |
| 45 | 45 |
typedef GR Digraph; |
| 46 | 46 |
///\brief The type of the map that stores the last |
| ... | ... |
@@ -112,22 +112,20 @@ |
| 112 | 112 |
|
| 113 | 113 |
///%BFS algorithm class. |
| 114 | 114 |
|
| 115 | 115 |
///\ingroup search |
| 116 | 116 |
///This class provides an efficient implementation of the %BFS algorithm. |
| 117 | 117 |
/// |
| 118 |
///\ |
|
| 118 |
///\tparam GR The digraph type the algorithm runs on. The default value is |
|
| 119 | 119 |
///\ref ListDigraph. The value of GR is not used directly by Bfs, it |
| 120 | 120 |
///is only passed to \ref BfsDefaultTraits. |
| 121 |
///\ |
|
| 121 |
///\tparam TR Traits class to set various data types used by the algorithm. |
|
| 122 | 122 |
///The default traits class is |
| 123 | 123 |
///\ref BfsDefaultTraits "BfsDefaultTraits<GR>". |
| 124 | 124 |
///See \ref BfsDefaultTraits for the documentation of |
| 125 | 125 |
///a Bfs traits class. |
| 126 |
/// |
|
| 127 |
///\author Alpar Juttner |
|
| 128 | 126 |
|
| 129 | 127 |
#ifdef DOXYGEN |
| 130 | 128 |
template <typename GR, |
| 131 | 129 |
typename TR> |
| 132 | 130 |
#else |
| 133 | 131 |
template <typename GR=ListDigraph, |
| ... | ... |
@@ -753,13 +751,13 @@ |
| 753 | 751 |
///@} |
| 754 | 752 |
}; |
| 755 | 753 |
|
| 756 | 754 |
///Default traits class of Bfs function. |
| 757 | 755 |
|
| 758 | 756 |
///Default traits class of Bfs function. |
| 759 |
///\ |
|
| 757 |
///\tparam GR Digraph type. |
|
| 760 | 758 |
template<class GR> |
| 761 | 759 |
struct BfsWizardDefaultTraits |
| 762 | 760 |
{
|
| 763 | 761 |
///The digraph type the algorithm runs on. |
| 764 | 762 |
typedef GR Digraph; |
| 765 | 763 |
///\brief The type of the map that stores the last |
| ... | ... |
@@ -1162,13 +1160,13 @@ |
| 1162 | 1160 |
}; |
| 1163 | 1161 |
#endif |
| 1164 | 1162 |
|
| 1165 | 1163 |
/// \brief Default traits class of BfsVisit class. |
| 1166 | 1164 |
/// |
| 1167 | 1165 |
/// Default traits class of BfsVisit class. |
| 1168 |
/// \ |
|
| 1166 |
/// \tparam _Digraph Digraph type. |
|
| 1169 | 1167 |
template<class _Digraph> |
| 1170 | 1168 |
struct BfsVisitDefaultTraits {
|
| 1171 | 1169 |
|
| 1172 | 1170 |
/// \brief The digraph type the algorithm runs on. |
| 1173 | 1171 |
typedef _Digraph Digraph; |
| 1174 | 1172 |
|
| ... | ... |
@@ -1198,26 +1196,24 @@ |
| 1198 | 1196 |
/// with visitor interface. |
| 1199 | 1197 |
/// |
| 1200 | 1198 |
/// The %BfsVisit class provides an alternative interface to the Bfs |
| 1201 | 1199 |
/// class. It works with callback mechanism, the BfsVisit object calls |
| 1202 | 1200 |
/// on every bfs event the \c Visitor class member functions. |
| 1203 | 1201 |
/// |
| 1204 |
/// \ |
|
| 1202 |
/// \tparam _Digraph The digraph type the algorithm runs on. The default value is |
|
| 1205 | 1203 |
/// \ref ListDigraph. The value of _Digraph is not used directly by Bfs, it |
| 1206 | 1204 |
/// is only passed to \ref BfsDefaultTraits. |
| 1207 |
/// \ |
|
| 1205 |
/// \tparam _Visitor The Visitor object for the algorithm. The |
|
| 1208 | 1206 |
/// \ref BfsVisitor "BfsVisitor<_Digraph>" is an empty Visitor which |
| 1209 | 1207 |
/// does not observe the Bfs events. If you want to observe the bfs |
| 1210 | 1208 |
/// events you should implement your own Visitor class. |
| 1211 |
/// \ |
|
| 1209 |
/// \tparam _Traits Traits class to set various data types used by the |
|
| 1212 | 1210 |
/// algorithm. The default traits class is |
| 1213 | 1211 |
/// \ref BfsVisitDefaultTraits "BfsVisitDefaultTraits<_Digraph>". |
| 1214 | 1212 |
/// See \ref BfsVisitDefaultTraits for the documentation of |
| 1215 | 1213 |
/// a Bfs visit traits class. |
| 1216 |
/// |
|
| 1217 |
/// \author Jacint Szabo, Alpar Juttner and Balazs Dezso |
|
| 1218 | 1214 |
#ifdef DOXYGEN |
| 1219 | 1215 |
template <typename _Digraph, typename _Visitor, typename _Traits> |
| 1220 | 1216 |
#else |
| 1221 | 1217 |
template <typename _Digraph = ListDigraph, |
| 1222 | 1218 |
typename _Visitor = BfsVisitor<_Digraph>, |
| 1223 | 1219 |
typename _Traits = BfsDefaultTraits<_Digraph> > |
| ... | ... |
@@ -36,16 +36,16 @@ |
| 36 | 36 |
///This class implements the \e binary \e heap data structure. A \e heap |
| 37 | 37 |
///is a data structure for storing items with specified values called \e |
| 38 | 38 |
///priorities in such a way that finding the item with minimum priority is |
| 39 | 39 |
///efficient. \c Compare specifies the ordering of the priorities. In a heap |
| 40 | 40 |
///one can change the priority of an item, add or erase an item, etc. |
| 41 | 41 |
/// |
| 42 |
///\param _Prio Type of the priority of the items. |
|
| 43 |
///\param _ItemIntMap A read and writable Item int map, used internally |
|
| 42 |
///\tparam _Prio Type of the priority of the items. |
|
| 43 |
///\tparam _ItemIntMap A read and writable Item int map, used internally |
|
| 44 | 44 |
///to handle the cross references. |
| 45 |
///\ |
|
| 45 |
///\tparam _Compare A class for the ordering of the priorities. The |
|
| 46 | 46 |
///default is \c std::less<_Prio>. |
| 47 | 47 |
/// |
| 48 | 48 |
///\sa FibHeap |
| 49 | 49 |
///\sa Dijkstra |
| 50 | 50 |
template <typename _Prio, typename _ItemIntMap, |
| 51 | 51 |
typename _Compare = std::less<_Prio> > |
| ... | ... |
@@ -91,14 +91,12 @@ |
| 91 | 91 |
/// degrees. The sub graph adaptors cannot signal the alterations because |
| 92 | 92 |
/// just a setting in the filter map can modify the graph and this cannot |
| 93 | 93 |
/// be watched in any way. |
| 94 | 94 |
/// |
| 95 | 95 |
/// \param _Container The container which is observed. |
| 96 | 96 |
/// \param _Item The item type which is obserbved. |
| 97 |
/// |
|
| 98 |
/// \author Balazs Dezso |
|
| 99 | 97 |
|
| 100 | 98 |
template <typename _Container, typename _Item> |
| 101 | 99 |
class AlterationNotifier {
|
| 102 | 100 |
public: |
| 103 | 101 |
|
| 104 | 102 |
typedef True Notifier; |
| ... | ... |
@@ -127,14 +125,12 @@ |
| 127 | 125 |
/// to notify the oberver when one item is added or |
| 128 | 126 |
/// erased. |
| 129 | 127 |
/// |
| 130 | 128 |
/// The build() and clear() members are to notify the observer |
| 131 | 129 |
/// about the container is built from an empty container or |
| 132 | 130 |
/// is cleared to an empty container. |
| 133 |
/// |
|
| 134 |
/// \author Balazs Dezso |
|
| 135 | 131 |
|
| 136 | 132 |
class ObserverBase {
|
| 137 | 133 |
protected: |
| 138 | 134 |
typedef AlterationNotifier Notifier; |
| 139 | 135 |
|
| 140 | 136 |
friend class AlterationNotifier; |
| ... | ... |
@@ -21,14 +21,12 @@ |
| 21 | 21 |
|
| 22 | 22 |
///\ingroup misc |
| 23 | 23 |
///\file |
| 24 | 24 |
///\brief Classes to compute with Bezier curves. |
| 25 | 25 |
/// |
| 26 | 26 |
///Up to now this file is used internally by \ref graph_to_eps.h |
| 27 |
/// |
|
| 28 |
///\author Alpar Juttner |
|
| 29 | 27 |
|
| 30 | 28 |
#include<lemon/dim2.h> |
| 31 | 29 |
|
| 32 | 30 |
namespace lemon {
|
| 33 | 31 |
namespace dim2 {
|
| 34 | 32 |
| ... | ... |
@@ -41,17 +41,16 @@ |
| 41 | 41 |
/// \brief Graph map based on the std::vector storage. |
| 42 | 42 |
/// |
| 43 | 43 |
/// The VectorMap template class is graph map structure what |
| 44 | 44 |
/// automatically updates the map when a key is added to or erased from |
| 45 | 45 |
/// the map. This map type uses the std::vector to store the values. |
| 46 | 46 |
/// |
| 47 |
/// \param Notifier The AlterationNotifier that will notify this map. |
|
| 48 |
/// \param Item The item type of the graph items. |
|
| 49 |
/// \param Value The value type of the map. |
|
| 50 |
/// |
|
| 51 |
/// \ |
|
| 47 |
/// \tparam _Notifier The AlterationNotifier that will notify this map. |
|
| 48 |
/// \tparam _Item The item type of the graph items. |
|
| 49 |
/// \tparam _Value The value type of the map. |
|
| 50 |
/// \todo Fix the doc: there is _Graph parameter instead of _Notifier. |
|
| 52 | 51 |
template <typename _Graph, typename _Item, typename _Value> |
| 53 | 52 |
class VectorMap |
| 54 | 53 |
: public ItemSetTraits<_Graph, _Item>::ItemNotifier::ObserverBase {
|
| 55 | 54 |
private: |
| 56 | 55 |
|
| 57 | 56 |
/// The container type of the map. |
| ... | ... |
@@ -37,13 +37,13 @@ |
| 37 | 37 |
|
| 38 | 38 |
/// \brief A skeleton structure for representing directed paths in |
| 39 | 39 |
/// a digraph. |
| 40 | 40 |
/// |
| 41 | 41 |
/// A skeleton structure for representing directed paths in a |
| 42 | 42 |
/// digraph. |
| 43 |
/// \ |
|
| 43 |
/// \tparam _Digraph The digraph type in which the path is. |
|
| 44 | 44 |
/// |
| 45 | 45 |
/// In a sense, the path can be treated as a list of arcs. The |
| 46 | 46 |
/// lemon path type stores just this list. As a consequence it |
| 47 | 47 |
/// cannot enumerate the nodes in the path and the zero length |
| 48 | 48 |
/// paths cannot store the source. |
| 49 | 49 |
/// |
| ... | ... |
@@ -202,13 +202,13 @@ |
| 202 | 202 |
/// If we would like to give back a real path from these |
| 203 | 203 |
/// algorithms then we should create a temporarly path object. In |
| 204 | 204 |
/// Lemon such algorithms gives back a path dumper what can |
| 205 | 205 |
/// assigned to a real path and the dumpers can be implemented as |
| 206 | 206 |
/// an adaptor class to the predecessor map. |
| 207 | 207 |
|
| 208 |
/// \ |
|
| 208 |
/// \tparam _Digraph The digraph type in which the path is. |
|
| 209 | 209 |
/// |
| 210 | 210 |
/// The paths can be constructed from any path type by a |
| 211 | 211 |
/// template constructor or a template assignment operator. |
| 212 | 212 |
/// |
| 213 | 213 |
template <typename _Digraph> |
| 214 | 214 |
class PathDumper {
|
| ... | ... |
@@ -35,13 +35,13 @@ |
| 35 | 35 |
namespace lemon {
|
| 36 | 36 |
|
| 37 | 37 |
|
| 38 | 38 |
///Default traits class of Dfs class. |
| 39 | 39 |
|
| 40 | 40 |
///Default traits class of Dfs class. |
| 41 |
///\ |
|
| 41 |
///\tparam GR Digraph type. |
|
| 42 | 42 |
template<class GR> |
| 43 | 43 |
struct DfsDefaultTraits |
| 44 | 44 |
{
|
| 45 | 45 |
///The digraph type the algorithm runs on. |
| 46 | 46 |
typedef GR Digraph; |
| 47 | 47 |
///\brief The type of the map that stores the last |
| ... | ... |
@@ -114,22 +114,20 @@ |
| 114 | 114 |
|
| 115 | 115 |
///%DFS algorithm class. |
| 116 | 116 |
|
| 117 | 117 |
///\ingroup search |
| 118 | 118 |
///This class provides an efficient implementation of the %DFS algorithm. |
| 119 | 119 |
/// |
| 120 |
///\ |
|
| 120 |
///\tparam GR The digraph type the algorithm runs on. The default value is |
|
| 121 | 121 |
///\ref ListDigraph. The value of GR is not used directly by Dfs, it |
| 122 | 122 |
///is only passed to \ref DfsDefaultTraits. |
| 123 |
///\ |
|
| 123 |
///\tparam TR Traits class to set various data types used by the algorithm. |
|
| 124 | 124 |
///The default traits class is |
| 125 | 125 |
///\ref DfsDefaultTraits "DfsDefaultTraits<GR>". |
| 126 | 126 |
///See \ref DfsDefaultTraits for the documentation of |
| 127 | 127 |
///a Dfs traits class. |
| 128 |
/// |
|
| 129 |
///\author Jacint Szabo and Alpar Juttner |
|
| 130 | 128 |
#ifdef DOXYGEN |
| 131 | 129 |
template <typename GR, |
| 132 | 130 |
typename TR> |
| 133 | 131 |
#else |
| 134 | 132 |
template <typename GR=ListDigraph, |
| 135 | 133 |
typename TR=DfsDefaultTraits<GR> > |
| ... | ... |
@@ -736,13 +734,13 @@ |
| 736 | 734 |
///@} |
| 737 | 735 |
}; |
| 738 | 736 |
|
| 739 | 737 |
///Default traits class of Dfs function. |
| 740 | 738 |
|
| 741 | 739 |
///Default traits class of Dfs function. |
| 742 |
///\ |
|
| 740 |
///\tparam GR Digraph type. |
|
| 743 | 741 |
template<class GR> |
| 744 | 742 |
struct DfsWizardDefaultTraits |
| 745 | 743 |
{
|
| 746 | 744 |
///The digraph type the algorithm runs on. |
| 747 | 745 |
typedef GR Digraph; |
| 748 | 746 |
///\brief The type of the map that stores the last |
| ... | ... |
@@ -1157,13 +1155,13 @@ |
| 1157 | 1155 |
}; |
| 1158 | 1156 |
#endif |
| 1159 | 1157 |
|
| 1160 | 1158 |
/// \brief Default traits class of DfsVisit class. |
| 1161 | 1159 |
/// |
| 1162 | 1160 |
/// Default traits class of DfsVisit class. |
| 1163 |
/// \ |
|
| 1161 |
/// \tparam _Digraph Digraph type. |
|
| 1164 | 1162 |
template<class _Digraph> |
| 1165 | 1163 |
struct DfsVisitDefaultTraits {
|
| 1166 | 1164 |
|
| 1167 | 1165 |
/// \brief The digraph type the algorithm runs on. |
| 1168 | 1166 |
typedef _Digraph Digraph; |
| 1169 | 1167 |
|
| ... | ... |
@@ -1192,20 +1190,20 @@ |
| 1192 | 1190 |
/// with visitor interface. |
| 1193 | 1191 |
/// |
| 1194 | 1192 |
/// The %DfsVisit class provides an alternative interface to the Dfs |
| 1195 | 1193 |
/// class. It works with callback mechanism, the DfsVisit object calls |
| 1196 | 1194 |
/// on every dfs event the \c Visitor class member functions. |
| 1197 | 1195 |
/// |
| 1198 |
/// \ |
|
| 1196 |
/// \tparam _Digraph The digraph type the algorithm runs on. The default value is |
|
| 1199 | 1197 |
/// \ref ListDigraph. The value of _Digraph is not used directly by Dfs, it |
| 1200 | 1198 |
/// is only passed to \ref DfsDefaultTraits. |
| 1201 |
/// \ |
|
| 1199 |
/// \tparam _Visitor The Visitor object for the algorithm. The |
|
| 1202 | 1200 |
/// \ref DfsVisitor "DfsVisitor<_Digraph>" is an empty Visitor which |
| 1203 | 1201 |
/// does not observe the Dfs events. If you want to observe the dfs |
| 1204 | 1202 |
/// events you should implement your own Visitor class. |
| 1205 |
/// \ |
|
| 1203 |
/// \tparam _Traits Traits class to set various data types used by the |
|
| 1206 | 1204 |
/// algorithm. The default traits class is |
| 1207 | 1205 |
/// \ref DfsVisitDefaultTraits "DfsVisitDefaultTraits<_Digraph>". |
| 1208 | 1206 |
/// See \ref DfsVisitDefaultTraits for the documentation of |
| 1209 | 1207 |
/// a Dfs visit traits class. |
| 1210 | 1208 |
/// |
| 1211 | 1209 |
/// \author Jacint Szabo, Alpar Juttner and Balazs Dezso |
| ... | ... |
@@ -74,14 +74,14 @@ |
| 74 | 74 |
} |
| 75 | 75 |
}; |
| 76 | 76 |
|
| 77 | 77 |
///Default traits class of Dijkstra class. |
| 78 | 78 |
|
| 79 | 79 |
///Default traits class of Dijkstra class. |
| 80 |
///\param GR Digraph type. |
|
| 81 |
///\param LM Type of length map. |
|
| 80 |
///\tparam GR Digraph type. |
|
| 81 |
///\tparam LM Type of length map. |
|
| 82 | 82 |
template<class GR, class LM> |
| 83 | 83 |
struct DijkstraDefaultTraits |
| 84 | 84 |
{
|
| 85 | 85 |
///The digraph type the algorithm runs on. |
| 86 | 86 |
typedef GR Digraph; |
| 87 | 87 |
///The type of the map that stores the arc lengths. |
| ... | ... |
@@ -191,29 +191,28 @@ |
| 191 | 191 |
/// |
| 192 | 192 |
///The type of the length is determined by the |
| 193 | 193 |
///\ref concepts::ReadMap::Value "Value" of the length map. |
| 194 | 194 |
/// |
| 195 | 195 |
///It is also possible to change the underlying priority heap. |
| 196 | 196 |
/// |
| 197 |
///\ |
|
| 197 |
///\tparam GR The digraph type the algorithm runs on. The default value |
|
| 198 | 198 |
///is \ref ListDigraph. The value of GR is not used directly by |
| 199 | 199 |
///Dijkstra, it is only passed to \ref DijkstraDefaultTraits. |
| 200 |
///\ |
|
| 200 |
///\tparam LM This read-only ArcMap determines the lengths of the |
|
| 201 | 201 |
///arcs. It is read once for each arc, so the map may involve in |
| 202 | 202 |
///relatively time consuming process to compute the arc length if |
| 203 | 203 |
///it is necessary. The default map type is \ref |
| 204 | 204 |
///concepts::Digraph::ArcMap "Digraph::ArcMap<int>". The value |
| 205 | 205 |
///of LM is not used directly by Dijkstra, it is only passed to \ref |
| 206 |
///DijkstraDefaultTraits. |
|
| 206 |
///DijkstraDefaultTraits. |
|
| 207 |
///\tparam TR Traits class to set |
|
| 207 | 208 |
///various data types used by the algorithm. The default traits |
| 208 | 209 |
///class is \ref DijkstraDefaultTraits |
| 209 | 210 |
///"DijkstraDefaultTraits<GR,LM>". See \ref |
| 210 | 211 |
///DijkstraDefaultTraits for the documentation of a Dijkstra traits |
| 211 | 212 |
///class. |
| 212 |
/// |
|
| 213 |
///\author Jacint Szabo and Alpar Juttner |
|
| 214 | 213 |
|
| 215 | 214 |
#ifdef DOXYGEN |
| 216 | 215 |
template <typename GR, typename LM, typename TR> |
| 217 | 216 |
#else |
| 218 | 217 |
template <typename GR=ListDigraph, |
| 219 | 218 |
typename LM=typename GR::template ArcMap<int>, |
| ... | ... |
@@ -872,14 +871,14 @@ |
| 872 | 871 |
|
| 873 | 872 |
|
| 874 | 873 |
|
| 875 | 874 |
///Default traits class of Dijkstra function. |
| 876 | 875 |
|
| 877 | 876 |
///Default traits class of Dijkstra function. |
| 878 |
///\param GR Digraph type. |
|
| 879 |
///\param LM Type of length map. |
|
| 877 |
///\tparam GR Digraph type. |
|
| 878 |
///\tparam LM Type of length map. |
|
| 880 | 879 |
template<class GR, class LM> |
| 881 | 880 |
struct DijkstraWizardDefaultTraits |
| 882 | 881 |
{
|
| 883 | 882 |
///The digraph type the algorithm runs on. |
| 884 | 883 |
typedef GR Digraph; |
| 885 | 884 |
///The type of the map that stores the arc lengths. |
| ... | ... |
@@ -413,13 +413,13 @@ |
| 413 | 413 |
const X &_arcWidths; |
| 414 | 414 |
ArcWidthsTraits(const T &t,const X &x) : T(t), _arcWidths(x) {}
|
| 415 | 415 |
}; |
| 416 | 416 |
///Sets the map of the arc widths |
| 417 | 417 |
|
| 418 | 418 |
///Sets the map of the arc widths |
| 419 |
///\param x must be |
|
| 419 |
///\param x must be an arc map with \c double (or convertible) values. |
|
| 420 | 420 |
template<class X> GraphToEps<ArcWidthsTraits<X> > arcWidths(const X &x) |
| 421 | 421 |
{
|
| 422 | 422 |
dontPrint=true; |
| 423 | 423 |
return GraphToEps<ArcWidthsTraits<X> >(ArcWidthsTraits<X>(*this,x)); |
| 424 | 424 |
} |
| 425 | 425 |
|
| ... | ... |
@@ -461,13 +461,13 @@ |
| 461 | 461 |
const X &_arcColors; |
| 462 | 462 |
ArcColorsTraits(const T &t,const X &x) : T(t), _arcColors(x) {}
|
| 463 | 463 |
}; |
| 464 | 464 |
///Sets the map of the arc colors |
| 465 | 465 |
|
| 466 | 466 |
///Sets the map of the arc colors |
| 467 |
///\param x must be |
|
| 467 |
///\param x must be an arc map with \ref Color values. |
|
| 468 | 468 |
/// |
| 469 | 469 |
///\sa Palette |
| 470 | 470 |
template<class X> GraphToEps<ArcColorsTraits<X> > |
| 471 | 471 |
arcColors(const X &x) |
| 472 | 472 |
{
|
| 473 | 473 |
dontPrint=true; |
| ... | ... |
@@ -351,14 +351,12 @@ |
| 351 | 351 |
///\endcode |
| 352 | 352 |
/// |
| 353 | 353 |
///\sa findArc() |
| 354 | 354 |
///\sa ArcLookUp |
| 355 | 355 |
///\sa AllArcLookUp |
| 356 | 356 |
///\sa DynArcLookUp |
| 357 |
/// |
|
| 358 |
/// \author Balazs Dezso |
|
| 359 | 357 |
template <typename _Graph> |
| 360 | 358 |
class ConArcIt : public _Graph::Arc {
|
| 361 | 359 |
public: |
| 362 | 360 |
|
| 363 | 361 |
typedef _Graph Graph; |
| 364 | 362 |
typedef typename Graph::Arc Parent; |
| ... | ... |
@@ -475,14 +473,12 @@ |
| 475 | 473 |
/// for (ConEdgeIt<Graph> it(g, src, trg); it != INVALID; ++it) {
|
| 476 | 474 |
/// ... |
| 477 | 475 |
/// } |
| 478 | 476 |
///\endcode |
| 479 | 477 |
/// |
| 480 | 478 |
///\sa findEdge() |
| 481 |
/// |
|
| 482 |
/// \author Balazs Dezso |
|
| 483 | 479 |
template <typename _Graph> |
| 484 | 480 |
class ConEdgeIt : public _Graph::Edge {
|
| 485 | 481 |
public: |
| 486 | 482 |
|
| 487 | 483 |
typedef _Graph Graph; |
| 488 | 484 |
typedef typename Graph::Edge Parent; |
| ... | ... |
@@ -1239,15 +1235,15 @@ |
| 1239 | 1235 |
/// and if a key is set to a new value then store it |
| 1240 | 1236 |
/// in the inverse map. |
| 1241 | 1237 |
/// |
| 1242 | 1238 |
/// The values of the map can be accessed |
| 1243 | 1239 |
/// with stl compatible forward iterator. |
| 1244 | 1240 |
/// |
| 1245 |
/// \param _Graph The graph type. |
|
| 1246 |
/// \param _Item The item type of the graph. |
|
| 1247 |
/// \ |
|
| 1241 |
/// \tparam _Graph The graph type. |
|
| 1242 |
/// \tparam _Item The item type of the graph. |
|
| 1243 |
/// \tparam _Value The value type of the map. |
|
| 1248 | 1244 |
/// |
| 1249 | 1245 |
/// \see IterableValueMap |
| 1250 | 1246 |
template <typename _Graph, typename _Item, typename _Value> |
| 1251 | 1247 |
class InvertableMap : protected DefaultMap<_Graph, _Item, _Value> {
|
| 1252 | 1248 |
private: |
| 1253 | 1249 |
|
| ... | ... |
@@ -1444,14 +1440,14 @@ |
| 1444 | 1440 |
/// different ids <li>\b continuous: the range of the ids is the set of |
| 1445 | 1441 |
/// integers between 0 and \c n-1, where \c n is the number of the items of |
| 1446 | 1442 |
/// this type (e.g. nodes) (so the id of a node can change if you delete an |
| 1447 | 1443 |
/// other node, i.e. this id is mutable). </ul> This map can be inverted |
| 1448 | 1444 |
/// with its member class \c InverseMap, or with the \c operator() member. |
| 1449 | 1445 |
/// |
| 1450 |
/// \param _Graph The graph class the \c DescriptorMap belongs to. |
|
| 1451 |
/// \param _Item The Item is the Key of the Map. It may be Node, Arc or |
|
| 1446 |
/// \tparam _Graph The graph class the \c DescriptorMap belongs to. |
|
| 1447 |
/// \tparam _Item The Item is the Key of the Map. It may be Node, Arc or |
|
| 1452 | 1448 |
/// Edge. |
| 1453 | 1449 |
template <typename _Graph, typename _Item> |
| 1454 | 1450 |
class DescriptorMap : protected DefaultMap<_Graph, _Item, int> {
|
| 1455 | 1451 |
|
| 1456 | 1452 |
typedef _Item Item; |
| 1457 | 1453 |
typedef DefaultMap<_Graph, _Item, int> Map; |
| ... | ... |
@@ -1634,13 +1630,12 @@ |
| 1634 | 1630 |
}; |
| 1635 | 1631 |
|
| 1636 | 1632 |
/// \brief Returns the source of the given arc. |
| 1637 | 1633 |
/// |
| 1638 | 1634 |
/// The SourceMap gives back the source Node of the given arc. |
| 1639 | 1635 |
/// \see TargetMap |
| 1640 |
/// \author Balazs Dezso |
|
| 1641 | 1636 |
template <typename Digraph> |
| 1642 | 1637 |
class SourceMap {
|
| 1643 | 1638 |
public: |
| 1644 | 1639 |
|
| 1645 | 1640 |
typedef typename Digraph::Node Value; |
| 1646 | 1641 |
typedef typename Digraph::Arc Key; |
| ... | ... |
@@ -1674,13 +1669,12 @@ |
| 1674 | 1669 |
} |
| 1675 | 1670 |
|
| 1676 | 1671 |
/// \brief Returns the target of the given arc. |
| 1677 | 1672 |
/// |
| 1678 | 1673 |
/// The TargetMap gives back the target Node of the given arc. |
| 1679 | 1674 |
/// \see SourceMap |
| 1680 |
/// \author Balazs Dezso |
|
| 1681 | 1675 |
template <typename Digraph> |
| 1682 | 1676 |
class TargetMap {
|
| 1683 | 1677 |
public: |
| 1684 | 1678 |
|
| 1685 | 1679 |
typedef typename Digraph::Node Value; |
| 1686 | 1680 |
typedef typename Digraph::Arc Key; |
| ... | ... |
@@ -1714,13 +1708,12 @@ |
| 1714 | 1708 |
} |
| 1715 | 1709 |
|
| 1716 | 1710 |
/// \brief Returns the "forward" directed arc view of an edge. |
| 1717 | 1711 |
/// |
| 1718 | 1712 |
/// Returns the "forward" directed arc view of an edge. |
| 1719 | 1713 |
/// \see BackwardMap |
| 1720 |
/// \author Balazs Dezso |
|
| 1721 | 1714 |
template <typename Graph> |
| 1722 | 1715 |
class ForwardMap {
|
| 1723 | 1716 |
public: |
| 1724 | 1717 |
|
| 1725 | 1718 |
typedef typename Graph::Arc Value; |
| 1726 | 1719 |
typedef typename Graph::Edge Key; |
| ... | ... |
@@ -1754,13 +1747,12 @@ |
| 1754 | 1747 |
} |
| 1755 | 1748 |
|
| 1756 | 1749 |
/// \brief Returns the "backward" directed arc view of an edge. |
| 1757 | 1750 |
/// |
| 1758 | 1751 |
/// Returns the "backward" directed arc view of an edge. |
| 1759 | 1752 |
/// \see ForwardMap |
| 1760 |
/// \author Balazs Dezso |
|
| 1761 | 1753 |
template <typename Graph> |
| 1762 | 1754 |
class BackwardMap {
|
| 1763 | 1755 |
public: |
| 1764 | 1756 |
|
| 1765 | 1757 |
typedef typename Graph::Arc Value; |
| 1766 | 1758 |
typedef typename Graph::Edge Key; |
| ... | ... |
@@ -2093,13 +2085,13 @@ |
| 2093 | 2085 |
///This class uses a self-adjusting binary search tree, Sleator's |
| 2094 | 2086 |
///and Tarjan's Splay tree for guarantee the logarithmic amortized |
| 2095 | 2087 |
///time bound for arc lookups. This class also guarantees the |
| 2096 | 2088 |
///optimal time bound in a constant factor for any distribution of |
| 2097 | 2089 |
///queries. |
| 2098 | 2090 |
/// |
| 2099 |
///\ |
|
| 2091 |
///\tparam G The type of the underlying digraph. |
|
| 2100 | 2092 |
/// |
| 2101 | 2093 |
///\sa ArcLookUp |
| 2102 | 2094 |
///\sa AllArcLookUp |
| 2103 | 2095 |
template<class G> |
| 2104 | 2096 |
class DynArcLookUp |
| 2105 | 2097 |
: protected ItemSetTraits<G, typename G::Arc>::ItemNotifier::ObserverBase |
| ... | ... |
@@ -2534,13 +2526,13 @@ |
| 2534 | 2526 |
/// |
| 2535 | 2527 |
///\warning This class is static, so you should refresh() (or at least |
| 2536 | 2528 |
///refresh(Node)) this data structure |
| 2537 | 2529 |
///whenever the digraph changes. This is a time consuming (superlinearly |
| 2538 | 2530 |
///proportional (<em>O(m</em>log<em>m)</em>) to the number of arcs). |
| 2539 | 2531 |
/// |
| 2540 |
///\ |
|
| 2532 |
///\tparam G The type of the underlying digraph. |
|
| 2541 | 2533 |
/// |
| 2542 | 2534 |
///\sa DynArcLookUp |
| 2543 | 2535 |
///\sa AllArcLookUp |
| 2544 | 2536 |
template<class G> |
| 2545 | 2537 |
class ArcLookUp |
| 2546 | 2538 |
{
|
| ... | ... |
@@ -2647,13 +2639,13 @@ |
| 2647 | 2639 |
/// |
| 2648 | 2640 |
///\warning This class is static, so you should refresh() (or at least |
| 2649 | 2641 |
///refresh(Node)) this data structure |
| 2650 | 2642 |
///whenever the digraph changes. This is a time consuming (superlinearly |
| 2651 | 2643 |
///proportional (<em>O(m</em>log<em>m)</em>) to the number of arcs). |
| 2652 | 2644 |
/// |
| 2653 |
///\ |
|
| 2645 |
///\tparam G The type of the underlying digraph. |
|
| 2654 | 2646 |
/// |
| 2655 | 2647 |
///\sa DynArcLookUp |
| 2656 | 2648 |
///\sa ArcLookUp |
| 2657 | 2649 |
template<class G> |
| 2658 | 2650 |
class AllArcLookUp : public ArcLookUp<G> |
| 2659 | 2651 |
{
|
| ... | ... |
@@ -37,13 +37,13 @@ |
| 37 | 37 |
/// @{
|
| 38 | 38 |
|
| 39 | 39 |
|
| 40 | 40 |
/// \brief A structure for representing directed paths in a digraph. |
| 41 | 41 |
/// |
| 42 | 42 |
/// A structure for representing directed path in a digraph. |
| 43 |
/// \ |
|
| 43 |
/// \tparam _Digraph The digraph type in which the path is. |
|
| 44 | 44 |
/// |
| 45 | 45 |
/// In a sense, the path can be treated as a list of arcs. The |
| 46 | 46 |
/// lemon path type stores just this list. As a consequence, it |
| 47 | 47 |
/// cannot enumerate the nodes of the path and the source node of |
| 48 | 48 |
/// a zero length path is undefined. |
| 49 | 49 |
/// |
| ... | ... |
@@ -225,13 +225,13 @@ |
| 225 | 225 |
|
| 226 | 226 |
}; |
| 227 | 227 |
|
| 228 | 228 |
/// \brief A structure for representing directed paths in a digraph. |
| 229 | 229 |
/// |
| 230 | 230 |
/// A structure for representing directed path in a digraph. |
| 231 |
/// \ |
|
| 231 |
/// \tparam _Digraph The digraph type in which the path is. |
|
| 232 | 232 |
/// |
| 233 | 233 |
/// In a sense, the path can be treated as a list of arcs. The |
| 234 | 234 |
/// lemon path type stores just this list. As a consequence it |
| 235 | 235 |
/// cannot enumerate the nodes in the path and the zero length paths |
| 236 | 236 |
/// cannot store the source. |
| 237 | 237 |
/// |
| ... | ... |
@@ -389,13 +389,13 @@ |
| 389 | 389 |
|
| 390 | 390 |
}; |
| 391 | 391 |
|
| 392 | 392 |
/// \brief A structure for representing directed paths in a digraph. |
| 393 | 393 |
/// |
| 394 | 394 |
/// A structure for representing directed path in a digraph. |
| 395 |
/// \ |
|
| 395 |
/// \tparam _Digraph The digraph type in which the path is. |
|
| 396 | 396 |
/// |
| 397 | 397 |
/// In a sense, the path can be treated as a list of arcs. The |
| 398 | 398 |
/// lemon path type stores just this list. As a consequence it |
| 399 | 399 |
/// cannot enumerate the nodes in the path and the zero length paths |
| 400 | 400 |
/// cannot store the source. |
| 401 | 401 |
/// |
| ... | ... |
@@ -729,13 +729,13 @@ |
| 729 | 729 |
|
| 730 | 730 |
}; |
| 731 | 731 |
|
| 732 | 732 |
/// \brief A structure for representing directed paths in a digraph. |
| 733 | 733 |
/// |
| 734 | 734 |
/// A structure for representing directed path in a digraph. |
| 735 |
/// \ |
|
| 735 |
/// \tparam _Digraph The digraph type in which the path is. |
|
| 736 | 736 |
/// |
| 737 | 737 |
/// In a sense, the path can be treated as a list of arcs. The |
| 738 | 738 |
/// lemon path type stores just this list. As a consequence it |
| 739 | 739 |
/// cannot enumerate the nodes in the path and the source node of |
| 740 | 740 |
/// a zero length path is undefined. |
| 741 | 741 |
/// |
| ... | ... |
@@ -199,14 +199,12 @@ |
| 199 | 199 |
///node and arc deletions</b>. |
| 200 | 200 |
///It conforms to the \ref concepts::Digraph "Digraph concept" with |
| 201 | 201 |
///an important extra feature that its maps are real \ref |
| 202 | 202 |
///concepts::ReferenceMap "reference map"s. |
| 203 | 203 |
/// |
| 204 | 204 |
///\sa concepts::Digraph. |
| 205 |
/// |
|
| 206 |
///\author Alpar Juttner |
|
| 207 | 205 |
class SmartDigraph : public ExtendedSmartDigraphBase {
|
| 208 | 206 |
public: |
| 209 | 207 |
|
| 210 | 208 |
typedef ExtendedSmartDigraphBase Parent; |
| 211 | 209 |
|
| 212 | 210 |
private: |
| ... | ... |
@@ -53,14 +53,12 @@ |
| 53 | 53 |
/// |
| 54 | 54 |
/// TimeStamp's can be added to or substracted from each other and |
| 55 | 55 |
/// they can be pushed to a stream. |
| 56 | 56 |
/// |
| 57 | 57 |
/// In most cases, perhaps the \ref Timer or the \ref TimeReport |
| 58 | 58 |
/// class is what you want to use instead. |
| 59 |
/// |
|
| 60 |
///\author Alpar Juttner |
|
| 61 | 59 |
|
| 62 | 60 |
class TimeStamp |
| 63 | 61 |
{
|
| 64 | 62 |
double utime; |
| 65 | 63 |
double stime; |
| 66 | 64 |
double cutime; |
| ... | ... |
@@ -293,14 +291,12 @@ |
| 293 | 291 |
/// |
| 294 | 292 |
///\note If you want to measure the running time of the execution of a certain |
| 295 | 293 |
///function, consider the usage of \ref TimeReport instead. |
| 296 | 294 |
/// |
| 297 | 295 |
///\todo This shouldn't be Unix (Linux) specific. |
| 298 | 296 |
///\sa TimeReport |
| 299 |
/// |
|
| 300 |
///\author Alpar Juttner |
|
| 301 | 297 |
class Timer |
| 302 | 298 |
{
|
| 303 | 299 |
int _running; //Timer is running iff _running>0; (_running>=0 always holds) |
| 304 | 300 |
TimeStamp start_time; //This is the relativ start-time if the timer |
| 305 | 301 |
//is _running, the collected _running time otherwise. |
| 306 | 302 |
|
0 comments (0 inline)