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

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

See also:
Graph::getAllEdges(Object, Object)

Implements org::_3pq::jgrapht::graph::AbstractBaseGraph::Specifics.

Definition at line 708 of file AbstractBaseGraph.java.

References org::_3pq::jgrapht::graph::AbstractBaseGraph::containsVertex(), getEdgeContainer(), org::_3pq::jgrapht::Edge::getTarget(), and org::_3pq::jgrapht::graph::AbstractBaseGraph::DirectedEdgeContainer::m_outgoing.

Referenced by edgesOf().

                                                                            {
            List edges = null;

            if( containsVertex( sourceVertex )
                    && containsVertex( targetVertex ) ) {
                edges = new ArrayList(  );

                DirectedEdgeContainer ec = getEdgeContainer( sourceVertex );

                Iterator              iter = ec.m_outgoing.iterator(  );

                while( iter.hasNext(  ) ) {
                    Edge e = (Edge) iter.next(  );

                    if( e.getTarget(  ).equals( targetVertex ) ) {
                        edges.add( e );
                    }
                }
            }

            return edges;
        }


Generated by  Doxygen 1.6.0   Back to index