# Changeset 125:19e82bda606a in lemon

Ignore:
Timestamp:
04/14/08 18:37:18 (16 years ago)
Branch:
default
Phase:
public
Message:

Fix bug #83 in graph concept, extender and smart graph

Location:
lemon
Files:
4 edited

Unmodified
Removed
• ## lemon/bits/graph_extender.h

 r107 Node oppositeNode(const Node &n, const Edge &e) const { if( n == Parent::source(e)) return Parent::target(e); else if( n == Parent::target(e)) return Parent::source(e); if( n == Parent::u(e)) return Parent::v(e); else if( n == Parent::v(e)) return Parent::u(e); else return INVALID; using Parent::direct; Arc direct(const Edge &edge, const Node &node) const { return Parent::direct(edge, Parent::source(edge) == node); return Parent::direct(edge, Parent::u(edge) == node); } /// Returns the base node of the iterator Node baseNode(const IncEdgeIt &edge) const { return edge._direction ? source(edge) : target(edge); return edge._direction ? u(edge) : v(edge); } /// Running node of the iterator /// Returns the running node of the iterator Node runningNode(const IncEdgeIt &edge) const { return edge._direction ? target(edge) : source(edge); return edge._direction ? v(edge) : u(edge); }
• ## lemon/concepts/digraph.h

 r107 }; template template struct Constraints { void constraints() { checkConcept, Digraph>(); checkConcept, Digraph>(); checkConcept, Digraph>(); checkConcept, _Digraph>(); checkConcept, _Digraph>(); checkConcept, _Digraph>(); } };
• ## lemon/concepts/graph.h

 r107 } template template struct Constraints { void constraints() { checkConcept, Graph>(); checkConcept, Graph>(); checkConcept, Graph>(); checkConcept, _Graph>(); checkConcept, _Graph>(); checkConcept, _Graph>(); } };
• ## lemon/smart_graph.h

 r109 Node target(Arc e) const { return Node(arcs[e._id].target); } Node source(Edge e) const { return Node(arcs[2 * e._id].target); } Node target(Edge e) const { return Node(arcs[2 * e._id + 1].target); } Node u(Edge e) const { return Node(arcs[2 * e._id].target); } Node v(Edge e) const { return Node(arcs[2 * e._id + 1].target); } static bool direction(Arc e) {
Note: See TracChangeset for help on using the changeset viewer.