1 <etik:class> |
1 <etik:class> |
2 <etik:name> |
2 <etik:name> |
3 Osztaly neve |
3 BfsIterator4<![CDATA[<]]>typename Graph, typename OutEdgeIt, |
|
4 typename ReachedMap<![CDATA[>]]> |
4 </etik:name> |
5 </etik:name> |
5 |
6 |
6 <etik:description> |
7 <etik:description> |
|
8 The class IteratorBfs4 <![CDATA[<]]>typename Graph, typename OutEdgeIt, |
|
9 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. |
7 Ez itt egy tobbsoros, tobb reszes leiras arrol, hogy altalanossagban |
10 Ez itt egy tobbsoros, tobb reszes leiras arrol, hogy altalanossagban |
8 mire is jo ez az osztaly. Ez itt egy tobbsoros, tobb reszes leiras |
11 mire is jo ez az osztaly. Ez itt egy tobbsoros, tobb reszes leiras |
9 arrol, hogy altalanossagban mire is jo ez az osztaly. |
12 arrol, hogy altalanossagban mire is jo ez az osztaly. |
10 <para> |
13 <para> |
11 Ez itt az uj bekezdese a leirasnak, mert elofordulhat, hogy tobb |
14 Ez itt az uj bekezdese a leirasnak, mert elofordulhat, hogy tobb |
48 ]]> |
51 ]]> |
49 </etik:code> |
52 </etik:code> |
50 </etik:example> |
53 </etik:example> |
51 |
54 |
52 <etik:definition> |
55 <etik:definition> |
|
56 Defined in bfs_iterator.hh. |
53 Ez a definition szekcio arra van, hogy beleirjuk, hogy milyen fajlban |
57 Ez a definition szekcio arra van, hogy beleirjuk, hogy milyen fajlban |
54 van definialva az aktualis osztaly. |
58 van definialva az aktualis osztaly. |
55 Ez <xref linkend="tutorial"/> egy link a tutorialra. |
59 Ez <xref linkend="tutorial"/> egy link a tutorialra. |
56 </etik:definition> |
60 </etik:definition> |
57 |
61 |
58 <etik:template_params> |
62 <etik:template_params> |
59 <etik:template_param> |
63 <etik:template_param> |
60 <etik:templ_name> |
64 <etik:templ_name> |
61 T |
65 Graph |
62 </etik:templ_name> |
66 </etik:templ_name> |
63 <etik:templ_description> |
67 <etik:templ_description> |
64 Ez itt a T parameter. Ebben adod meg hogy milyen izekbol epitsunk kupacot. |
68 Graph is a graph type which have to satisfy some concept requirements defined at a later date. |
65 </etik:templ_description> |
69 </etik:templ_description> |
66 <etik:templ_requirement> |
70 <etik:templ_requirement> |
|
71 Mittomen |
67 Legyen implementalva neki az osszehasonlito operator. |
72 Legyen implementalva neki az osszehasonlito operator. |
68 </etik:templ_requirement> |
73 </etik:templ_requirement> |
69 <etik:templ_default> |
74 <etik:templ_default> |
70 Az nincs |
75 Az nincs |
71 </etik:templ_default> |
76 </etik:templ_default> |
72 </etik:template_param> |
77 </etik:template_param> |
73 <etik:template_param> |
78 <etik:template_param> |
74 <etik:templ_name> |
79 <etik:templ_name> |
75 Af |
80 OutEdgeIt |
76 </etik:templ_name> |
81 </etik:templ_name> |
77 <etik:templ_description> |
82 <etik:templ_description> |
|
83 OutEdgeIt is an edge iterator type. |
|
84 The bfs iterator iterates on the edges. |
78 Az Af template parameter is egy olyan vacak, ami a generikussaghoz kell. |
85 Az Af template parameter is egy olyan vacak, ami a generikussaghoz kell. |
79 </etik:templ_description> |
86 </etik:templ_description> |
80 <etik:templ_requirement> |
87 <etik:templ_requirement> |
81 Af szarmazzon az elemi osztalyokbol. |
88 Af szarmazzon az elemi osztalyokbol. |
82 </etik:templ_requirement> |
89 </etik:templ_requirement> |
83 <etik:templ_default> |
90 <etik:templ_default> |
84 0 |
91 0 |
85 </etik:templ_default> |
92 </etik:templ_default> |
86 </etik:template_param> |
93 </etik:template_param> |
|
94 <etik:template_param> |
|
95 <etik:templ_name> |
|
96 ReachedMap |
|
97 </etik:templ_name> |
|
98 <etik:templ_description> |
|
99 ReachedMap is a map type which stores a bool for each node, and will ne used to maintain the set of reached nodes. |
|
100 Az Af template parameter is egy olyan vacak, ami a generikussaghoz kell. |
|
101 </etik:templ_description> |
|
102 <etik:templ_requirement> |
|
103 Readable and Writable nodemap. |
|
104 Af szarmazzon az elemi osztalyokbol. |
|
105 </etik:templ_requirement> |
|
106 <etik:templ_default> |
|
107 0 |
|
108 </etik:templ_default> |
|
109 </etik:template_param> |
87 </etik:template_params> |
110 </etik:template_params> |
88 |
111 |
89 |
112 |
90 <etik:members> |
113 <etik:members> |
91 <etik:member> |
114 |
92 <etik:m_name> |
115 <etik:member> |
93 iterator |
116 <etik:m_name> |
94 </etik:m_name> |
117 BfsIterator4(const Graph& _G, ReachedMap& _reached) |
95 <etik:m_where_def> |
118 </etik:m_name> |
96 container |
119 <etik:m_where_def> |
97 </etik:m_where_def> |
120 |
98 <etik:m_description> |
121 </etik:m_where_def> |
99 Arra valo, hogy vegigiteraljunk vele. |
122 <etik:m_description> |
100 </etik:m_description> |
123 Creates a bfs iterator with empty queue. The reached nodes will be stores in |
101 |
124 the map for that _reached refers. Initially, _reached have to be an everywhere |
102 </etik:member> |
125 false map. Other cases also can be specified, but due to the difficulty, I have no stomach to deal with it. |
103 <etik:member> |
126 </etik:m_description> |
104 <etik:m_name> |
127 |
105 void push_back(const T&) |
128 </etik:member> |
106 </etik:m_name> |
129 |
107 <etik:m_where_def> |
130 <etik:member> |
108 Back Insertion Sequence |
131 <etik:m_name> |
109 </etik:m_where_def> |
132 BfsIterator4(const Graph& _G) |
110 <etik:m_description> |
133 </etik:m_name> |
111 Egy uj element tesz e vegere. |
134 <etik:m_where_def> |
112 </etik:m_description> |
135 - |
113 |
136 </etik:m_where_def> |
114 </etik:member> |
137 <etik:m_description> |
|
138 The same as above, but an own map is constructed to store the reached nodes (and is destroyed at the and). |
|
139 </etik:m_description> |
|
140 |
|
141 </etik:member> |
|
142 |
|
143 <etik:member> |
|
144 <etik:m_name> |
|
145 void pushAndSetReached(NodeIt s) |
|
146 </etik:m_name> |
|
147 <etik:m_where_def> |
|
148 |
|
149 </etik:m_where_def> |
|
150 <etik:m_description> |
|
151 Inserts s in the bfs queue and marks it reached. |
|
152 </etik:m_description> |
|
153 |
|
154 </etik:member> |
|
155 |
|
156 <etik:member> |
|
157 <etik:m_name> |
|
158 BfsIterator4<![CDATA[<]]>Graph, OutEdgeIt, ReachedMap<![CDATA[>]]>& operator++() |
|
159 </etik:m_name> |
|
160 <etik:m_where_def> |
|
161 container |
|
162 </etik:m_where_def> |
|
163 <etik:m_description> |
|
164 Executes one step on the bfs iterator. |
|
165 </etik:m_description> |
|
166 |
|
167 </etik:member> |
|
168 |
|
169 <etik:member> |
|
170 <etik:m_name> |
|
171 bool finished() const |
|
172 </etik:m_name> |
|
173 <etik:m_where_def> |
|
174 container |
|
175 </etik:m_where_def> |
|
176 <etik:m_description> |
|
177 Returns true if and only if the iteration is finished. |
|
178 </etik:m_description> |
|
179 |
|
180 </etik:member> |
|
181 |
|
182 <etik:member> |
|
183 <etik:m_name> |
|
184 operator OutEdgeIt () const |
|
185 </etik:m_name> |
|
186 <etik:m_where_def> |
|
187 container |
|
188 </etik:m_where_def> |
|
189 <etik:m_description> |
|
190 This conversion operator returns the actual value of the bfs iterator. |
|
191 </etik:m_description> |
|
192 |
|
193 </etik:member> |
|
194 |
|
195 <etik:member> |
|
196 <etik:m_name> |
|
197 bool isBNodeNewlyReached() const |
|
198 </etik:m_name> |
|
199 <etik:m_where_def> |
|
200 container |
|
201 </etik:m_where_def> |
|
202 <etik:m_description> |
|
203 Precondition: OutEdgeIt() returns a valid iterator. |
|
204 Returns true if and only if bNode of OutEdgeIt() is reached at the last |
|
205 iteration step. |
|
206 </etik:m_description> |
|
207 |
|
208 </etik:member> |
|
209 |
|
210 <etik:member> |
|
211 <etik:m_name> |
|
212 bool isANodeExamined() const |
|
213 </etik:m_name> |
|
214 <etik:m_where_def> |
|
215 container |
|
216 </etik:m_where_def> |
|
217 <etik:m_description> |
|
218 Returns true if and only if the actual node bacomes examined. |
|
219 </etik:m_description> |
|
220 |
|
221 </etik:member> |
|
222 |
|
223 <etik:member> |
|
224 <etik:m_name> |
|
225 NodeIt aNode() const |
|
226 </etik:m_name> |
|
227 <etik:m_where_def> |
|
228 container |
|
229 </etik:m_where_def> |
|
230 <etik:m_description> |
|
231 Returns the actual node. |
|
232 </etik:m_description> |
|
233 |
|
234 </etik:member> |
|
235 |
|
236 <etik:member> |
|
237 <etik:m_name> |
|
238 NodeIt bNode() const |
|
239 </etik:m_name> |
|
240 <etik:m_where_def> |
|
241 container |
|
242 </etik:m_where_def> |
|
243 <etik:m_description> |
|
244 Precondition: OutEdgeIt() returns a valid iterator. |
|
245 Returns bNode of the actual edge.. |
|
246 </etik:m_description> |
|
247 |
|
248 </etik:member> |
|
249 |
|
250 <etik:member> |
|
251 <etik:m_name> |
|
252 const ReachedMap& getReachedMap() const |
|
253 </etik:m_name> |
|
254 <etik:m_where_def> |
|
255 container |
|
256 </etik:m_where_def> |
|
257 <etik:m_description> |
|
258 Const reference to the reached map. |
|
259 </etik:m_description> |
|
260 |
|
261 </etik:member> |
|
262 |
|
263 <etik:member> |
|
264 <etik:m_name> |
|
265 const std::queue<![CDATA[<]]>NodeIt<![CDATA[>]]>& getBfsQueue() const |
|
266 </etik:m_name> |
|
267 <etik:m_where_def> |
|
268 container |
|
269 </etik:m_where_def> |
|
270 <etik:m_description> |
|
271 Const reference to the bfs queue. |
|
272 </etik:m_description> |
|
273 |
|
274 </etik:member> |
|
275 |
|
276 |
115 </etik:members> |
277 </etik:members> |
116 |
278 |
117 |
279 |
118 |
280 |
119 |
281 |