commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simonetrip...@apache.org>
Subject Re: svn commit: r1295694 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java
Date Thu, 01 Mar 2012 19:43:40 GMT
YEAH congrats and thank you! :)
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Thu, Mar 1, 2012 at 6:39 PM,  <tn@apache.org> wrote:
> Author: tn
> Date: Thu Mar  1 17:39:59 2012
> New Revision: 1295694
>
> URL: http://svn.apache.org/viewvc?rev=1295694&view=rev
> Log:
> fixed unified graph search algorithm in case of non-default visitor implementations
>
> Modified:
>    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java
>
> Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java
> URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java?rev=1295694&r1=1295693&r2=1295694&view=diff
> ==============================================================================
> --- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java
(original)
> +++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java
Thu Mar  1 17:39:59 2012
> @@ -138,6 +138,13 @@ final class DefaultVisitAlgorithmsSelect
>                 }
>             }
>
> +            // only mark the current vertex as visited, if the
> +            // edge leading to should be expanded
> +            if ( !skipVertex )
> +            {
> +                visitedVertices.add( v );
> +            }
> +
>             if ( !skipVertex && handler.discoverVertex( v ) )
>             {
>                 Iterator<V> connected = ( graph instanceof DirectedGraph
) ?
> @@ -150,7 +157,6 @@ final class DefaultVisitAlgorithmsSelect
>                     if ( !visitedVertices.contains( w ) )
>                     {
>                         vertexList.addLast( new VertexPair<V>( w, v
) );
> -                        visitedVertices.add( w );
>                     }
>                 }
>             }
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message