Changeset 1540:7d028a73d7f2 in lemon0.x for lemon/graph_utils.h
 Timestamp:
 07/05/05 16:36:10 (15 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2034
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/graph_utils.h
r1538 r1540 31 31 ///\brief Graph utilities. 32 32 /// 33 ///\todo Please34 ///revise the documentation.35 33 /// 36 34 … … 43 41 /// \brief Function to count the items in the graph. 44 42 /// 45 /// This function counts the items in the graph.43 /// This function counts the items (nodes, edges etc) in the graph. 46 44 /// The complexity of the function is O(n) because 47 45 /// it iterates on all of the items. … … 126 124 /// This function counts the undirected edges in the graph. 127 125 /// The complexity of the function is O(e) but for some 128 /// graph structure it is specialized to run in O(1).126 /// graph structures it is specialized to run in O(1). 129 127 130 128 template <typename Graph> … … 194 192 } 195 193 196 /// \brief Copy the source map to the targetmap.197 /// 198 /// Copy the \c source map to the \c target map. It uses the given iterator199 /// to iterate on the data structure and it use the \c ref mapping to200 /// convert the source's keys to the target's keys.194 /// \brief Copy a map. 195 /// 196 /// Thsi function copies the \c source map to the \c target map. It uses the 197 /// given iterator to iterate on the data structure and it uses the \c ref 198 /// mapping to convert the source's keys to the target's keys. 201 199 template <typename Target, typename Source, 202 200 typename ItemIt, typename Ref> … … 221 219 222 220 223 /// \brief Class to copy a graph to an other graph.224 /// 225 /// Class to copy a graph to an other graph . It can be used easier226 /// with the \c copyGraph() function.221 /// \brief Class to copy a graph. 222 /// 223 /// Class to copy a graph to an other graph (duplicate a graph). The 224 /// simplest way of using it is through the \c copyGraph() function. 227 225 template <typename Target, typename Source> 228 226 class GraphCopy { … … 355 353 /// After the copy the \c nr map will contain the mapping from the 356 354 /// source graph's nodes to the target graph's nodes and the \c ecr will 357 /// contain the mapping from the target graph's edge to the source's355 /// contain the mapping from the target graph's edges to the source's 358 356 /// edges. 359 357 template <typename Target, typename Source> … … 459 457 /// Provides an immutable and unique id for each item in the graph. 460 458 461 /// The IdMap class provides a unique and immutable mapping for each item 462 /// in the graph. 459 /// The IdMap class provides a unique and immutable id for each item of the 460 /// same type (e.g. node) in the graph. This id is <ul><li>\b unique: 461 /// different items (nodes) get different ids <li>\b immutable: the id of an 462 /// item (node) does not change (even if you delete other nodes). </ul> 463 /// Through this map you get access (i.e. can read) the inner id values of 464 /// the items stored in the graph. This map can be inverted with its member 465 /// class \c InverseMap. 463 466 /// 464 467 template <typename _Graph, typename _Item> … … 488 491 public: 489 492 490 /// \brief The class represents the inverse of the map.491 /// 492 /// The class represents the inverse of the map.493 /// \brief The class represents the inverse of its owner (IdMap). 494 /// 495 /// The class represents the inverse of its owner (IdMap). 493 496 /// \see inverse() 494 497 class InverseMap { … … 518 521 /// \brief Gives back the inverse of the map. 519 522 /// 520 /// Gives back the inverse of the map.523 /// Gives back the inverse of the IdMap. 521 524 InverseMap inverse() const { return InverseMap(*graph);} 522 525 … … 526 529 /// \brief General invertable graphmap type. 527 530 528 /// This type provides simple invertable map functions.531 /// This type provides simple invertable graphmaps. 529 532 /// The InvertableMap wraps an arbitrary ReadWriteMap 530 533 /// and if a key is set to a new value then store it … … 659 662 /// item in the graph. 660 663 /// 661 /// The DescriptorMap class provides a mutable, continuous and immutable 662 /// mapping for each item in the graph. The value for an item may mutated 663 /// on each operation when the an item erased or added to graph. 664 /// The DescriptorMap class provides a unique and continuous (but mutable) 665 /// descriptor (id) for each item of the same type (e.g. node) in the 666 /// graph. This id is <ul><li>\b unique: different items (nodes) get 667 /// different ids <li>\b continuous: the range of the ids is the set of 668 /// integers between 0 and \c n1, where \c n is the number of the items of 669 /// this type (e.g. nodes) (so the id of a node can change if you delete an 670 /// other node, i.e. this id is mutable). </ul> This map can be inverted 671 /// with its member class \c InverseMap. 664 672 /// 665 673 /// \param _Graph The graph class the \c DescriptorMap belongs to. … … 755 763 756 764 public: 757 /// \brief The inverse map type .758 /// 759 /// The inverse map type .765 /// \brief The inverse map type of DescriptorMap. 766 /// 767 /// The inverse map type of DescriptorMap. 760 768 class InverseMap { 761 769 public: … … 874 882 /// \brief Returns a \ref TargetMap class 875 883 /// 876 /// This function just returns a n\ref TargetMap class.884 /// This function just returns a \ref TargetMap class. 877 885 /// \relates TargetMap 878 886 template <typename Graph> … … 881 889 } 882 890 883 /// \brief Returns the "forward" directed edge view of undirected edge.884 /// 885 /// Returns the "forward" directed edge view of undirected edge.891 /// \brief Returns the "forward" directed edge view of an undirected edge. 892 /// 893 /// Returns the "forward" directed edge view of an undirected edge. 886 894 /// \author Balazs Dezso 887 895 template <typename Graph> … … 922 930 } 923 931 924 /// \brief Returns the "backward" directed edge view of undirected edge.925 /// 926 /// Returns the "backward" directed edge view of undirected edge.932 /// \brief Returns the "backward" directed edge view of an undirected edge. 933 /// 934 /// Returns the "backward" directed edge view of an undirected edge. 927 935 /// \author Balazs Dezso 928 936 template <typename Graph> … … 955 963 /// \brief Returns a \ref BackwardMap class 956 964 957 /// This function just returns a n\ref BackwardMap class.965 /// This function just returns a \ref BackwardMap class. 958 966 /// \relates BackwardMap 959 967 template <typename Graph> … … 976 984 /// \brief Map of the node indegrees. 977 985 /// 978 /// This map returns the indegree of a node. On esit is constructed,986 /// This map returns the indegree of a node. Once it is constructed, 979 987 /// the degrees are stored in a standard NodeMap, so each query is done 980 /// in constant time. On the other hand, the values updatesautomatically988 /// in constant time. On the other hand, the values are updated automatically 981 989 /// whenever the graph changes. 982 990 /// … … 1068 1076 /// \brief Map of the node outdegrees. 1069 1077 /// 1070 /// This map returns the outdegree of a node. On e it is constructed,1078 /// This map returns the outdegree of a node. Once it is constructed, 1071 1079 /// the degrees are stored in a standard NodeMap, so each query is done 1072 /// in constant time. On the other hand, the values updatesautomatically1080 /// in constant time. On the other hand, the values are updated automatically 1073 1081 /// whenever the graph changes. 1074 1082 ///
Note: See TracChangeset
for help on using the changeset viewer.