Commit 133ce532 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

* clean up undirected adaptor (see ticket #13)

* fix python filtering in-edges bug


git-svn-id: https://svn.forked.de/graph-tool/trunk@79 d4600afd-f417-0410-95de-beed9576f240
parent 89004f4b
......@@ -256,22 +256,6 @@ protected:
typename graph_traits<Graph>::in_edge_iterator _in_iter;
};
//==============================================================================
// UndirectedAdaptorInEdgeIterator
// this will iterate through both in_edges and out_edges of the underlying graph
//==============================================================================
template <typename Graph>
class UndirectedAdaptorInEdgeIterator
: public UndirectedAdaptorOutEdgeIterator<Graph>
{
public:
typename UndirectedAdaptor<Graph>::EdgeDescriptor operator*() const
{
typename UndirectedAdaptor<Graph>::EdgeDescriptor edge = UndirectedAdaptorOutEdgeIterator<Graph>::operator*();
return (typename UndirectedAdaptor<Graph>::EdgeDescriptor (edge.OriginalEdge(),!edge.IsInverted()));
}
};
//==============================================================================
// UndirectedAdaptorAdjacencyIterator
// just keeps an internal reference to out_edge_iterator and calls target() when
......@@ -359,7 +343,7 @@ struct graph_traits< UndirectedAdaptor<Graph> > {
typedef UndirectedAdaptorAdjacencyIterator<Graph> adjacency_iterator;
typedef UndirectedAdaptorOutEdgeIterator<Graph> out_edge_iterator;
typedef UndirectedAdaptorOutEdgeIterator<Graph> in_edge_iterator;
typedef typename graph_traits<Graph>::in_edge_iterator in_edge_iterator;
typedef typename graph_traits<Graph>::vertex_iterator vertex_iterator;
typedef UndirectedAdaptorEdgeIterator<Graph> edge_iterator;
......
......@@ -214,7 +214,7 @@ public:
const Graph& g = get<0>(base);
const vertex_descriptor& v = get<1>(base);
const dynamic_properties& dp = get<2>(base);
return get_in_edges(g, v, dp, typename is_convertible<typename graph_traits<Graph>::directed_category, undirected_tag>::type());
return get_in_edges(g, v, dp, typename is_convertible<typename graph_traits<Graph>::directed_category, directed_tag>::type());
}
else
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment