Package org.codehaus.plexus.graph

Examples of org.codehaus.plexus.graph.Edge


        visitor.discoverVertex( v );

        Iterator edges = graph.getOutbound( v ).iterator();
        while ( edges.hasNext() )
        {
            Edge e = (Edge) edges.next();
            visitEdge( graph, e, visitor );
        }

        visitor.finishVertex( v );
View Full Code Here


        visitor.discoverVertex( vertex );
        Iterator edges = graph.getEdges( vertex ).iterator();
        while ( edges.hasNext() )
        {
            Edge edge = (Edge) edges.next();

            double edgeCost = graph.getWeight( edge );
            ComparableEdge wEdge = new ComparableEdge( edge, edgeCost + cost );
            tasks.insert( wEdge );
        }
View Full Code Here

            }

            Iterator edges = edgeSet.iterator();
            while ( edges.hasNext() )
            {
                Edge edge = (Edge) edges.next();

                RC.addEdge( edge, getTarget( edge ), getSource( edge ) );
            }

            return RC;
View Full Code Here

        pw.println( "<EDGESET>" );

        Iterator edges = graph.getEdges().iterator();
        while ( edges.hasNext() )
        {
            Edge next = (Edge) edges.next();

            int length = new Double( lengthFactor * defaultLength ).intValue();

            if ( graph instanceof WeightedGraph )
            {
View Full Code Here

        visitor.discoverVertex( v );

        Iterator edges = graph.getOutbound( v ).iterator();
        while ( edges.hasNext() )
        {
            Edge e = (Edge) edges.next();
            visitEdge( graph, e, visitor );
        }

        visitor.finishVertex( v );
View Full Code Here

        }

        // Bring the edges out in the right order.
        while ( !queue.isEmpty() )
        {
            Edge e = (Edge) queue.pop();

            if ( connectsLabels( graph, e ) )
            {
                addEdge( graph, e );
            }
View Full Code Here

        visitor.discoverVertex( vertex );
        Iterator edges = graph.getEdges( vertex ).iterator();
        while ( edges.hasNext() )
        {
            Edge edge = (Edge) edges.next();

            double edgeCost = graph.getWeight( edge );
            ComparableEdge wEdge = new ComparableEdge( edge, edgeCost + cost );
            tasks.insert( wEdge );
        }
View Full Code Here

            // First round values need to be in the matrix.
            Iterator edgeSet = graph.getOutbound( vArray[i] ).iterator();
            while ( edgeSet.hasNext() )
            {
                Edge e = (Edge) edgeSet.next();
                int j = index( graph.getTarget( e ) );
                pred[i][j] = i;
                if ( graph instanceof WeightedGraph )
                {
                    cost[i][j] = ( (WeightedGraph) graph ).getWeight( e );
View Full Code Here

        }

        /** Description of the Method */
        public Object get( int index )
        {
            Edge RC = null;

            Vertex source = (Vertex) vertices.get( index );
            Vertex target = (Vertex) vertices.get( index + 1 );

            Set outboundSet = graph.getOutbound( source );
View Full Code Here

                Iterator outbound = graph.getOutbound( workingPath.getEnd() ).iterator();

                while ( outbound.hasNext() )
                {
                    Edge obEdge = (Edge) outbound.next();
                    if ( apsp.hasPath( graph.getTarget( obEdge ), j ) )
                    {

                        PathImpl path = workingPath.append( graph.getTarget( obEdge ), obEdge );
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.graph.Edge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.