COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
02/20/05 02:02:07 (19 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1559
Message:

Graph and UndirGraph? concept modifications.

  • For incidence iterators ({In,Out,Inc}EdgeIt?) there is now baseNode and runningNode functions in graph interface
  • For Edge in undir graphs: Edge(UndirGraph? const &, UndirEdge?, Node) constructor. Same for IncEdgeIt?
  • Edge(UndirEdge?, bool) constructor is no more in the public interface. (But we need it in the developpers interface).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/undir_graph_extender.h

    r1060 r1158  
    4545    public:
    4646      Edge() {}
    47       /// Construct a direct edge from undirect edge and a direction.
     47
     48      /// \brief Directed edge from undirected edge and a direction.
     49      ///
     50      /// This constructor is not a part of the concept interface of
     51      /// undirected graph, so please avoid using it if possible!
    4852      Edge(const UndirEdge &ue, bool _forward) :
    49         UndirEdge(ue), forward(_forward) {}
     53        UndirEdge(ue), forward(_forward) {}
     54
     55      /// \brief Directed edge from undirected edge and a source node.
     56      ///
     57      /// Constructs a directed edge from undirected edge and a source node.
     58      ///
     59      /// \note You have to specify the graph for this constructor.
     60      Edge(const Graph &g, const UndirEdge &ue, const Node &n) :
     61        UndirEdge(ue) { forward = (g.source(ue) == n); }
     62
    5063      /// Invalid edge constructor
    5164      Edge(Invalid i) : UndirEdge(i), forward(true) {}
     
    6477
    6578
    66     /// \brief Returns the Edge of opposite direction.
    67     ///
    68     /// \bug Is this a good name for this? Or "reverse" is better?
     79    /// \brief Edge of opposite direction.
     80    ///
     81    /// Returns the Edge of opposite direction.
    6982    Edge opposite(const Edge &e) const {
    7083      return Edge(e,!e.forward);
     
    118131    }
    119132
     133    /// Directed edge from an undirected edge and a source node.
     134    ///
     135    /// Returns a (directed) Edge corresponding to the specified UndirEdge
     136    /// and source Node.
     137    ///
     138    ///\todo Do we need this?
     139    ///
     140    ///\todo Better name...
     141    Edge edgeWithSource(const UndirEdge &ue, const Node &s) const {
     142      return Edge(*this, eu, s);
     143    }
    120144
    121145    using Parent::first;
Note: See TracChangeset for help on using the changeset viewer.