gravatar
kpeter (Peter Kovacs)
kpeter@inf.elte.hu
Add an undirected() function (#364)
0 1 0
default
1 file changed with 19 insertions and 0 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -445,6 +445,25 @@
445 445

	
446 446
  }
447 447

	
448
  /// Check whether a graph is undirected.
449
  ///
450
  /// This function returns \c true if the given graph is undirected.
451
#ifdef DOXYGEN
452
  template <typename GR>
453
  bool undirected(const GR& g) { return false; }
454
#else
455
  template <typename GR>
456
  typename enable_if<UndirectedTagIndicator<GR>, bool>::type
457
  undirected(const GR&) {
458
    return true;
459
  }
460
  template <typename GR>
461
  typename disable_if<UndirectedTagIndicator<GR>, bool>::type
462
  undirected(const GR&) {
463
    return false;
464
  }
465
#endif
466

	
448 467
  /// \brief Class to copy a digraph.
449 468
  ///
450 469
  /// Class to copy a digraph to another digraph (duplicate a digraph). The
0 comments (0 inline)