What about
atDepth(0) ?

Michael

Am 03.11.2011 um 03:33 schrieb Peter Neubauer:

> Alex,
> looking at the source, the Evaluators.toDepth() does:
> 
> public static Evaluator toDepth( final int depth )
>    {
>        return new Evaluator()
>        {
>            public Evaluation evaluate( Path path )
>            {
>                return path.length() < depth ?
> Evaluation.INCLUDE_AND_CONTINUE : Evaluation.INCLUDE_AND_PRUNE;
>            }
>        };
>    }
> 
> So it won't work. However, question is if it should be inclusive or
> not. WDYAT? I could change it to
> 
> return path.length() <= depth ? Evaluation.INCLUDE_AND_CONTINUE :
> Evaluation.INCLUDE_AND_PRUNE;
> 
> Cheers,
> 
> /peter neubauer
> 
> GTalk:      neubauer.peter
> Skype       peter.neubauer
> Phone       +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter      http://twitter.com/peterneubauer
> 
> http://www.neo4j.org              - NOSQL for the Enterprise.
> http://startupbootcamp.org/    - Ă–resund - Innovation happens HERE.
> 
> 
> 
> On Wed, Nov 2, 2011 at 11:59 AM, Alex <a...@auv.name> wrote:
>> Hi everybody
>> 
>> when setting fromDepth and toDepth both at zero, like in the following code
>> 
>> Traversal.description.breadthFirst
>>  .evaluator(Evaluators.fromDepth(0))
>>  .evaluator(Evaluators.toDepth(0))
>> 
>> I'm expecting to get only the start node, but I don't. Am I missing
>> anything?
>> 
>> Thanks!
>> 
>> Cheers
>> Alex
>> 
>> --
>> View this message in context: 
>> http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3474825.html
>> Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
>> _______________________________________________
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>> 
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to