equal
deleted
inserted
replaced
33 ///\brief FullGraph and SymFullGraph classes. |
33 ///\brief FullGraph and SymFullGraph classes. |
34 |
34 |
35 |
35 |
36 namespace lemon { |
36 namespace lemon { |
37 |
37 |
38 /// \addtogroup graphs |
|
39 /// @{ |
|
40 |
|
41 class FullGraphBase { |
38 class FullGraphBase { |
42 int NodeNum; |
39 int NodeNum; |
43 int EdgeNum; |
40 int EdgeNum; |
44 public: |
41 public: |
45 |
42 |
193 |
190 |
194 typedef AlterableGraphExtender<FullGraphBase> AlterableFullGraphBase; |
191 typedef AlterableGraphExtender<FullGraphBase> AlterableFullGraphBase; |
195 typedef IterableGraphExtender<AlterableFullGraphBase> IterableFullGraphBase; |
192 typedef IterableGraphExtender<AlterableFullGraphBase> IterableFullGraphBase; |
196 typedef DefaultMappableGraphExtender<IterableFullGraphBase> MappableFullGraphBase; |
193 typedef DefaultMappableGraphExtender<IterableFullGraphBase> MappableFullGraphBase; |
197 |
194 |
|
195 /// \addtogroup graphs |
|
196 /// @{ |
|
197 |
198 ///A full graph class. |
198 ///A full graph class. |
199 |
199 |
200 ///This is a simple and fast directed full graph implementation. |
200 ///This is a simple and fast directed full graph implementation. |
201 ///It is completely static, so you can neither add nor delete either |
201 ///It is completely static, so you can neither add nor delete either |
202 ///edges or nodes. |
202 ///edges or nodes. |
209 public: |
209 public: |
210 |
210 |
211 FullGraph(int n) { construct(n); } |
211 FullGraph(int n) { construct(n); } |
212 }; |
212 }; |
213 |
213 |
|
214 ///@} |
214 |
215 |
215 // Base graph class for UndirFullGraph. |
216 // Base graph class for UndirFullGraph. |
216 class UndirFullGraphBase { |
217 class UndirFullGraphBase { |
217 int NodeNum; |
218 int NodeNum; |
218 int EdgeNum; |
219 int EdgeNum; |
371 e.id = source < NodeNum ? source * (source - 1) / 2 + target : -1; |
372 e.id = source < NodeNum ? source * (source - 1) / 2 + target : -1; |
372 } |
373 } |
373 |
374 |
374 }; |
375 }; |
375 |
376 |
|
377 /// \addtogroup graphs |
|
378 /// @{ |
|
379 |
|
380 |
376 /// \todo UndirFullGraph from the UndirFullGraphBase |
381 /// \todo UndirFullGraph from the UndirFullGraphBase |
377 |
382 |
378 |
|
379 |
383 |
380 /// @} |
384 /// @} |
381 |
385 |
382 } //namespace lemon |
386 } //namespace lemon |
383 |
387 |