Logo Search packages:      
Sourcecode: libjgrapht-java version File versions  Download package

List org::_3pq::jgrapht::graph::AsUndirectedGraph::getAllEdges ( Object  sourceVertex,
Object  targetVertex 
) [inline]

See also:
org._3pq.jgrapht.Graph::getAllEdges(Object, Object)

Reimplemented from org::_3pq::jgrapht::graph::GraphDelegator.

Definition at line 105 of file AsUndirectedGraph.java.

                                                                        {
        List forwardList = super.getAllEdges( sourceVertex, targetVertex );

        if( sourceVertex.equals( targetVertex ) ) {
            // avoid duplicating loops
            return forwardList;
        }

        List reverseList = super.getAllEdges( targetVertex, sourceVertex );
        List list =
            new ArrayList( forwardList.size(  ) + reverseList.size(  ) );
        list.addAll( forwardList );
        list.addAll( reverseList );

        return list;
    }


Generated by  Doxygen 1.6.0   Back to index