COIN-OR::LEMON - Graph Library

Changeset 883:dc376822c17d in lemon-main


Ignore:
Timestamp:
04/05/10 23:41:05 (15 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Add an undirected() function (#364)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/core.h

    r877 r883  
    445445
    446446  }
     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
    447466
    448467  /// \brief Class to copy a digraph.
Note: See TracChangeset for help on using the changeset viewer.