... | ... |
@@ -393,41 +393,48 @@ |
393 | 393 |
|
394 | 394 |
|
395 | 395 |
protected: |
396 | 396 |
|
397 | 397 |
MaxCardinalitySearch() {} |
398 | 398 |
|
399 | 399 |
public: |
400 | 400 |
|
401 | 401 |
/// \brief Constructor. |
402 | 402 |
/// |
403 | 403 |
///\param digraph the digraph the algorithm will run on. |
404 | 404 |
///\param capacity the capacity map used by the algorithm. |
405 |
///When no capacity map given, a constant 1 capacity map will |
|
406 |
///be allocated. |
|
407 |
#ifdef DOXYGEN |
|
408 | 405 |
MaxCardinalitySearch(const Digraph& digraph, |
409 |
const CapacityMap& capacity=0 ) : |
|
410 |
#else |
|
411 |
MaxCardinalitySearch(const Digraph& digraph, |
|
412 |
const CapacityMap& capacity=*static_cast<const CapacityMap*>(0) ) : |
|
413 |
|
|
406 |
const CapacityMap& capacity) : |
|
414 | 407 |
_graph(&digraph), |
415 | 408 |
_capacity(&capacity), local_capacity(false), |
416 | 409 |
_cardinality(0), local_cardinality(false), |
417 | 410 |
_processed(0), local_processed(false), |
418 | 411 |
_heap_cross_ref(0), local_heap_cross_ref(false), |
419 | 412 |
_heap(0), local_heap(false) |
420 | 413 |
{ } |
421 | 414 |
|
415 |
/// \brief Constructor. |
|
416 |
/// |
|
417 |
///\param digraph the digraph the algorithm will run on. |
|
418 |
/// |
|
419 |
///A constant 1 capacity map will be allocated. |
|
420 |
MaxCardinalitySearch(const Digraph& digraph) : |
|
421 |
_graph(&digraph), |
|
422 |
_capacity(0), local_capacity(false), |
|
423 |
_cardinality(0), local_cardinality(false), |
|
424 |
_processed(0), local_processed(false), |
|
425 |
_heap_cross_ref(0), local_heap_cross_ref(false), |
|
426 |
_heap(0), local_heap(false) |
|
427 |
{ } |
|
428 |
|
|
422 | 429 |
/// \brief Destructor. |
423 | 430 |
~MaxCardinalitySearch() { |
424 | 431 |
if(local_capacity) delete _capacity; |
425 | 432 |
if(local_cardinality) delete _cardinality; |
426 | 433 |
if(local_processed) delete _processed; |
427 | 434 |
if(local_heap_cross_ref) delete _heap_cross_ref; |
428 | 435 |
if(local_heap) delete _heap; |
429 | 436 |
} |
430 | 437 |
|
431 | 438 |
/// \brief Sets the capacity map. |
432 | 439 |
/// |
433 | 440 |
/// Sets the capacity map. |
0 comments (0 inline)