1.1 --- a/doc-docbook/src/xml/search_iterator.xml Thu Mar 04 13:08:17 2004 +0000
1.2 +++ b/doc-docbook/src/xml/search_iterator.xml Thu Mar 04 15:13:43 2004 +0000
1.3 @@ -1,9 +1,12 @@
1.4 <etik:class>
1.5 <etik:name>
1.6 - Osztaly neve
1.7 + BfsIterator4<![CDATA[<]]>typename Graph, typename OutEdgeIt,
1.8 + typename ReachedMap<![CDATA[>]]>
1.9 </etik:name>
1.10
1.11 <etik:description>
1.12 +The class IteratorBfs4 <![CDATA[<]]>typename Graph, typename OutEdgeIt,
1.13 + typename ReachedMap<![CDATA[>]]> implements an edge iterator which iterates on the edges of a directed or undirected graph in a breadth first search order. As a bare iterator, it stores the actual edge, the bfs queue and the map of reached nodes. The usual interpretation of bfs consists of computing auxiliary quantities i.e. distance from root or tree of edges on which the reachable nodes were reached. This iterator approach entrusts such functionalities to the user, they have to be implemented out of the class.
1.14 Ez itt egy tobbsoros, tobb reszes leiras arrol, hogy altalanossagban
1.15 mire is jo ez az osztaly. Ez itt egy tobbsoros, tobb reszes leiras
1.16 arrol, hogy altalanossagban mire is jo ez az osztaly.
1.17 @@ -50,6 +53,7 @@
1.18 </etik:example>
1.19
1.20 <etik:definition>
1.21 +Defined in bfs_iterator.hh.
1.22 Ez a definition szekcio arra van, hogy beleirjuk, hogy milyen fajlban
1.23 van definialva az aktualis osztaly.
1.24 Ez <xref linkend="tutorial"/> egy link a tutorialra.
1.25 @@ -58,12 +62,13 @@
1.26 <etik:template_params>
1.27 <etik:template_param>
1.28 <etik:templ_name>
1.29 -T
1.30 +Graph
1.31 </etik:templ_name>
1.32 <etik:templ_description>
1.33 -Ez itt a T parameter. Ebben adod meg hogy milyen izekbol epitsunk kupacot.
1.34 +Graph is a graph type which have to satisfy some concept requirements defined at a later date.
1.35 </etik:templ_description>
1.36 <etik:templ_requirement>
1.37 +Mittomen
1.38 Legyen implementalva neki az osszehasonlito operator.
1.39 </etik:templ_requirement>
1.40 <etik:templ_default>
1.41 @@ -72,9 +77,11 @@
1.42 </etik:template_param>
1.43 <etik:template_param>
1.44 <etik:templ_name>
1.45 -Af
1.46 +OutEdgeIt
1.47 </etik:templ_name>
1.48 <etik:templ_description>
1.49 +OutEdgeIt is an edge iterator type.
1.50 +The bfs iterator iterates on the edges.
1.51 Az Af template parameter is egy olyan vacak, ami a generikussaghoz kell.
1.52 </etik:templ_description>
1.53 <etik:templ_requirement>
1.54 @@ -84,34 +91,189 @@
1.55 0
1.56 </etik:templ_default>
1.57 </etik:template_param>
1.58 +<etik:template_param>
1.59 +<etik:templ_name>
1.60 +ReachedMap
1.61 +</etik:templ_name>
1.62 +<etik:templ_description>
1.63 +ReachedMap is a map type which stores a bool for each node, and will ne used to maintain the set of reached nodes.
1.64 +Az Af template parameter is egy olyan vacak, ami a generikussaghoz kell.
1.65 +</etik:templ_description>
1.66 +<etik:templ_requirement>
1.67 +Readable and Writable nodemap.
1.68 +Af szarmazzon az elemi osztalyokbol.
1.69 +</etik:templ_requirement>
1.70 +<etik:templ_default>
1.71 +0
1.72 +</etik:templ_default>
1.73 +</etik:template_param>
1.74 </etik:template_params>
1.75
1.76
1.77 <etik:members>
1.78 +
1.79 <etik:member>
1.80 <etik:m_name>
1.81 -iterator
1.82 +BfsIterator4(const Graph& _G, ReachedMap& _reached)
1.83 +</etik:m_name>
1.84 +<etik:m_where_def>
1.85 +
1.86 +</etik:m_where_def>
1.87 +<etik:m_description>
1.88 +Creates a bfs iterator with empty queue. The reached nodes will be stores in
1.89 +the map for that _reached refers. Initially, _reached have to be an everywhere
1.90 +false map. Other cases also can be specified, but due to the difficulty, I have no stomach to deal with it.
1.91 +</etik:m_description>
1.92 +
1.93 +</etik:member>
1.94 +
1.95 +<etik:member>
1.96 +<etik:m_name>
1.97 +BfsIterator4(const Graph& _G)
1.98 +</etik:m_name>
1.99 +<etik:m_where_def>
1.100 +-
1.101 +</etik:m_where_def>
1.102 +<etik:m_description>
1.103 +The same as above, but an own map is constructed to store the reached nodes (and is destroyed at the and).
1.104 +</etik:m_description>
1.105 +
1.106 +</etik:member>
1.107 +
1.108 +<etik:member>
1.109 +<etik:m_name>
1.110 +void pushAndSetReached(NodeIt s)
1.111 +</etik:m_name>
1.112 +<etik:m_where_def>
1.113 +
1.114 +</etik:m_where_def>
1.115 +<etik:m_description>
1.116 +Inserts s in the bfs queue and marks it reached.
1.117 +</etik:m_description>
1.118 +
1.119 +</etik:member>
1.120 +
1.121 +<etik:member>
1.122 +<etik:m_name>
1.123 +BfsIterator4<![CDATA[<]]>Graph, OutEdgeIt, ReachedMap<![CDATA[>]]>& operator++()
1.124 </etik:m_name>
1.125 <etik:m_where_def>
1.126 container
1.127 </etik:m_where_def>
1.128 <etik:m_description>
1.129 -Arra valo, hogy vegigiteraljunk vele.
1.130 +Executes one step on the bfs iterator.
1.131 </etik:m_description>
1.132
1.133 </etik:member>
1.134 +
1.135 <etik:member>
1.136 <etik:m_name>
1.137 -void push_back(const T&)
1.138 +bool finished() const
1.139 </etik:m_name>
1.140 <etik:m_where_def>
1.141 -Back Insertion Sequence
1.142 +container
1.143 </etik:m_where_def>
1.144 <etik:m_description>
1.145 -Egy uj element tesz e vegere.
1.146 +Returns true if and only if the iteration is finished.
1.147 </etik:m_description>
1.148
1.149 </etik:member>
1.150 +
1.151 +<etik:member>
1.152 +<etik:m_name>
1.153 +operator OutEdgeIt () const
1.154 +</etik:m_name>
1.155 +<etik:m_where_def>
1.156 +container
1.157 +</etik:m_where_def>
1.158 +<etik:m_description>
1.159 +This conversion operator returns the actual value of the bfs iterator.
1.160 +</etik:m_description>
1.161 +
1.162 +</etik:member>
1.163 +
1.164 +<etik:member>
1.165 +<etik:m_name>
1.166 +bool isBNodeNewlyReached() const
1.167 +</etik:m_name>
1.168 +<etik:m_where_def>
1.169 +container
1.170 +</etik:m_where_def>
1.171 +<etik:m_description>
1.172 +Precondition: OutEdgeIt() returns a valid iterator.
1.173 +Returns true if and only if bNode of OutEdgeIt() is reached at the last
1.174 +iteration step.
1.175 +</etik:m_description>
1.176 +
1.177 +</etik:member>
1.178 +
1.179 +<etik:member>
1.180 +<etik:m_name>
1.181 +bool isANodeExamined() const
1.182 +</etik:m_name>
1.183 +<etik:m_where_def>
1.184 +container
1.185 +</etik:m_where_def>
1.186 +<etik:m_description>
1.187 +Returns true if and only if the actual node bacomes examined.
1.188 +</etik:m_description>
1.189 +
1.190 +</etik:member>
1.191 +
1.192 +<etik:member>
1.193 +<etik:m_name>
1.194 +NodeIt aNode() const
1.195 +</etik:m_name>
1.196 +<etik:m_where_def>
1.197 +container
1.198 +</etik:m_where_def>
1.199 +<etik:m_description>
1.200 +Returns the actual node.
1.201 +</etik:m_description>
1.202 +
1.203 +</etik:member>
1.204 +
1.205 +<etik:member>
1.206 +<etik:m_name>
1.207 +NodeIt bNode() const
1.208 +</etik:m_name>
1.209 +<etik:m_where_def>
1.210 +container
1.211 +</etik:m_where_def>
1.212 +<etik:m_description>
1.213 +Precondition: OutEdgeIt() returns a valid iterator.
1.214 +Returns bNode of the actual edge..
1.215 +</etik:m_description>
1.216 +
1.217 +</etik:member>
1.218 +
1.219 +<etik:member>
1.220 +<etik:m_name>
1.221 +const ReachedMap& getReachedMap() const
1.222 +</etik:m_name>
1.223 +<etik:m_where_def>
1.224 +container
1.225 +</etik:m_where_def>
1.226 +<etik:m_description>
1.227 +Const reference to the reached map.
1.228 +</etik:m_description>
1.229 +
1.230 +</etik:member>
1.231 +
1.232 +<etik:member>
1.233 +<etik:m_name>
1.234 +const std::queue<![CDATA[<]]>NodeIt<![CDATA[>]]>& getBfsQueue() const
1.235 +</etik:m_name>
1.236 +<etik:m_where_def>
1.237 +container
1.238 +</etik:m_where_def>
1.239 +<etik:m_description>
1.240 +Const reference to the bfs queue.
1.241 +</etik:m_description>
1.242 +
1.243 +</etik:member>
1.244 +
1.245 +
1.246 </etik:members>
1.247
1.248