Package org.codehaus.plexus.graph

Examples of org.codehaus.plexus.graph.Vertex


                            Edge e,
                            Visitor visitor )
    {
        visitor.discoverEdge( e );

        Vertex v = graph.getTarget( e );

        if ( getColor( v ) == WHITE )
        {
            visitVertex( graph, v, visitor );
        }
View Full Code Here


        visitor.discoverGraph( graph );

        Iterator vertices = graph.getVertices().iterator();
        while ( vertices.hasNext() )
        {
            Vertex v = (Vertex) vertices.next();

            if ( colors.get( v ) == WHITE )
            {
                visitVertex( graph, v, visitor );
            }
View Full Code Here

        visitor.discoverEdge( e );

        Iterator vertices = graph.getVertices( e ).iterator();
        while ( vertices.hasNext() )
        {
            Vertex v = (Vertex) vertices.next();
            if ( colors.get( v ) == WHITE )
            {
                visitVertex( graph, v, cost, visitor );
            }
        }
View Full Code Here

    {
        pw.println( "<NODESET>" );
        Iterator vertices = graph.getVertices().iterator();
        while ( vertices.hasNext() )
        {
            Vertex v = (Vertex) vertices.next();

            pw.println( "<NODE nodeID=\"" + v.toString() + "\">" );
            pw.println( "<NODE_LOCATION x=\"" + random.nextInt( 200 ) + "\" y = \"" + random.nextInt( 200 ) +
                "\" visible=\"true\" />" );

            String label;
            if ( v instanceof Named )
            {
                label = ( (Named) v ).getName();
            }
            else
            {
                label = v.toString();
            }

            String backColor = null;
            String textColor = null;
View Full Code Here

                            Edge e,
                            Visitor visitor )
    {
        visitor.discoverEdge( e );

        Vertex v = graph.getTarget( e );

        if ( colors.get( v ) == WHITE )
        {
            visitVertex( graph, v, visitor );
        }
View Full Code Here

        Iterator vertices = graph.getVertices( edge ).iterator();
        Label prime = null;

        if ( vertices.hasNext() )
        {
            Vertex p = (Vertex) vertices.next();
            prime = findLabel( p );

            connect( edge, p );
        }

        while ( vertices.hasNext() )
        {
            Vertex v = (Vertex) vertices.next();

            Label l = findLabel( v );
            l.setRoot( prime );

            connect( edge, v );
View Full Code Here

        // Fill the graph we have with all the Vertexes.
        Iterator vertices = graph.getVertices().iterator();
        while ( vertices.hasNext() )
        {
            Vertex v = (Vertex) vertices.next();
            labels.put( v, new Label() );
            addVertex( v );
        }

        // Bring the edges out in the right order.
View Full Code Here

        visitor.discoverEdge( e );

        Iterator vertices = graph.getVertices( e ).iterator();
        while ( vertices.hasNext() )
        {
            Vertex v = (Vertex) vertices.next();
            if ( colors.get( v ) == WHITE )
            {
                visitVertex( graph, v, cost, visitor );
            }
        }
View Full Code Here

                                    DataFlowEquations eq )
    {
        Iterator vertices = graph.getVertices().iterator();
        while ( vertices.hasNext() )
        {
            Vertex v = (Vertex) vertices.next();
            inValues.put( v, new BitSet() );   // Initialize everything to
            outValues.put( v, new BitSet() )// empty
        }

        boolean isOK = true;
        while ( isOK )
        {
            vertices = graph.getVertices().iterator();
            isOK = false;
            while ( vertices.hasNext() )
            {
                Vertex v = (Vertex) vertices.next();

                BitSet out = new BitSet();
                out.or( (BitSet) inValues.get( v ) );
                out.or( eq.generates( v ) );
                out.andNot( eq.kills( v ) );

                /*
            System.err.println("Old Out: " + v + ":" + outValues.get( v ));
            System.err.println("New Out: " + v + ":" + out);
            */
                if ( !out.equals( outValues.get( v ) ) )
                {
                    isOK = true;
                    outValues.put( v, out );

                    Iterator outbound = graph.getOutbound( v ).iterator();
                    while ( outbound.hasNext() )
                    {
                        Vertex target = graph.getTarget( (Edge) outbound.next() );

                        BitSet in = (BitSet) inValues.get( target );
                        in.or( out );
                        inValues.put( target, in );
                        /*
 
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 );
            if ( outboundSet == null )
            {
                return null;
View Full Code Here

TOP

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

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.