Re: [Neo4j] zero fromDepth and toDepth

2011-11-15 Thread Peter Neubauer
Done,
enjoy!  https://github.com/neo4j/community/issues/80

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 Thu, Nov 3, 2011 at 10:08 PM, Peter Neubauer 
peter.neuba...@neotechnology.com wrote:

 We can do this after 1.5.

 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 Thu, Nov 3, 2011 at 12:28 PM, Mattias Persson
 matt...@neotechnology.com wrote:
  Sure, but implementations using it will break then. Maybe not this close
 to
  release? hard decision.
 
  2011/11/3 Peter Neubauer peter.neuba...@neotechnology.com
 
  So,
  do we fix the implementation to match (see
  https://github.com/neo4j/community/issues/80) or adjust the JavaDoc? I
  kinda think it makes sense to change the code, have written tests for
  it.
 
  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 Thu, Nov 3, 2011 at 12:21 AM, Mattias Persson
  matt...@neotechnology.com wrote:
   Right, the toDepth implementation isn't matching the javadoc and it
 is a
   bit confusing.
  
   2011/11/3 Alex a...@auv.name
  
   Done:
  
  
  
 
 http://neo4jdb.lighthouseapp.com/projects/77609-neo4j-community/tickets/17-consisnte-behavior-of-fromdepth-todepth-and-atdepth
  
   there's a typo in the title... time to get some sleep :)
  
   Alex
  
   --
   View this message in context:
  
 
 http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476080.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
  
  
  
  
   --
   Mattias Persson, [matt...@neotechnology.com]
   Hacker, Neo Technology
   www.neotechnology.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
 
 
 
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo Technology
  www.neotechnology.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


Re: [Neo4j] zero fromDepth and toDepth

2011-11-03 Thread Mattias Persson
Right, the toDepth implementation isn't matching the javadoc and it is a
bit confusing.

2011/11/3 Alex a...@auv.name

 Done:


 http://neo4jdb.lighthouseapp.com/projects/77609-neo4j-community/tickets/17-consisnte-behavior-of-fromdepth-todepth-and-atdepth

 there's a typo in the title... time to get some sleep :)

 Alex

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476080.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] zero fromDepth and toDepth

2011-11-03 Thread Peter Neubauer
So,
do we fix the implementation to match (see
https://github.com/neo4j/community/issues/80) or adjust the JavaDoc? I
kinda think it makes sense to change the code, have written tests for
it.

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 Thu, Nov 3, 2011 at 12:21 AM, Mattias Persson
matt...@neotechnology.com wrote:
 Right, the toDepth implementation isn't matching the javadoc and it is a
 bit confusing.

 2011/11/3 Alex a...@auv.name

 Done:


 http://neo4jdb.lighthouseapp.com/projects/77609-neo4j-community/tickets/17-consisnte-behavior-of-fromdepth-todepth-and-atdepth

 there's a typo in the title... time to get some sleep :)

 Alex

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476080.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




 --
 Mattias Persson, [matt...@neotechnology.com]
 Hacker, Neo Technology
 www.neotechnology.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


Re: [Neo4j] zero fromDepth and toDepth

2011-11-03 Thread Mattias Persson
Sure, but implementations using it will break then. Maybe not this close to
release? hard decision.

2011/11/3 Peter Neubauer peter.neuba...@neotechnology.com

 So,
 do we fix the implementation to match (see
 https://github.com/neo4j/community/issues/80) or adjust the JavaDoc? I
 kinda think it makes sense to change the code, have written tests for
 it.

 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 Thu, Nov 3, 2011 at 12:21 AM, Mattias Persson
 matt...@neotechnology.com wrote:
  Right, the toDepth implementation isn't matching the javadoc and it is a
  bit confusing.
 
  2011/11/3 Alex a...@auv.name
 
  Done:
 
 
 
 http://neo4jdb.lighthouseapp.com/projects/77609-neo4j-community/tickets/17-consisnte-behavior-of-fromdepth-todepth-and-atdepth
 
  there's a typo in the title... time to get some sleep :)
 
  Alex
 
  --
  View this message in context:
 
 http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476080.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
 
 
 
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo Technology
  www.neotechnology.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] zero fromDepth and toDepth

2011-11-03 Thread Peter Neubauer
We can do this after 1.5.

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 Thu, Nov 3, 2011 at 12:28 PM, Mattias Persson
matt...@neotechnology.com wrote:
 Sure, but implementations using it will break then. Maybe not this close to
 release? hard decision.

 2011/11/3 Peter Neubauer peter.neuba...@neotechnology.com

 So,
 do we fix the implementation to match (see
 https://github.com/neo4j/community/issues/80) or adjust the JavaDoc? I
 kinda think it makes sense to change the code, have written tests for
 it.

 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 Thu, Nov 3, 2011 at 12:21 AM, Mattias Persson
 matt...@neotechnology.com wrote:
  Right, the toDepth implementation isn't matching the javadoc and it is a
  bit confusing.
 
  2011/11/3 Alex a...@auv.name
 
  Done:
 
 
 
 http://neo4jdb.lighthouseapp.com/projects/77609-neo4j-community/tickets/17-consisnte-behavior-of-fromdepth-todepth-and-atdepth
 
  there's a typo in the title... time to get some sleep :)
 
  Alex
 
  --
  View this message in context:
 
 http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476080.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
 
 
 
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo Technology
  www.neotechnology.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




 --
 Mattias Persson, [matt...@neotechnology.com]
 Hacker, Neo Technology
 www.neotechnology.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] zero fromDepth and toDepth

2011-11-02 Thread Alex
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


Re: [Neo4j] zero fromDepth and toDepth

2011-11-02 Thread 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


Re: [Neo4j] zero fromDepth and toDepth

2011-11-02 Thread Michael Hunger
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


Re: [Neo4j] zero fromDepth and toDepth

2011-11-02 Thread Alex
Hi Peter

it admittedly makes little sense to use fromDepth(0)  toDepth(0) because
there's obviously no need to run the query at all. Anyway, I'd expect a
behavior consistent with, for example fromDepth(1)  toDepth(1), which
returns only nodes at depth 1 (if I'm not mistaken). So, I'd definitely
modify the code for the sake of consistency. For the same reason, atDepth(0)
should also return the start node.

Cheers
Alex

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476040.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


Re: [Neo4j] zero fromDepth and toDepth

2011-11-02 Thread Peter Neubauer
Well,
fromDepth is

public static Evaluator fromDepth( final int depth )
{
return new Evaluator()
{
public Evaluation evaluate( Path path )
{
return path.length()  depth ?
Evaluation.EXCLUDE_AND_CONTINUE : Evaluation.INCLUDE_AND_CONTINUE;
}
};
}

So it is inclusive. Given these, fromDepth(1)  toDepth(1) will not
return anything. Have not checked though. Feels like you have a point
there. Mattias, WDYT?

Also, atDepth(0) should return the start node?

public static Evaluator atDepth( final int depth )
{
return new Evaluator()
{
public Evaluation evaluate( Path path )
{
return path.length()  depth ?
Evaluation.EXCLUDE_AND_CONTINUE : Evaluation.INCLUDE_AND_PRUNE;
}
};
}

/peter

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 7:51 PM, Alex a...@auv.name wrote:
 Hi Peter

 it admittedly makes little sense to use fromDepth(0)  toDepth(0) because
 there's obviously no need to run the query at all. Anyway, I'd expect a
 behavior consistent with, for example fromDepth(1)  toDepth(1), which
 returns only nodes at depth 1 (if I'm not mistaken). So, I'd definitely
 modify the code for the sake of consistency. For the same reason, atDepth(0)
 should also return the start node.

 Cheers
 Alex

 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476040.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


Re: [Neo4j] zero fromDepth and toDepth

2011-11-02 Thread Alex
That sounds a bit bizarre: in my code, fromDepth(n)  toDepth(n) seems to be
working like atDepth(n) if n0 (that's what should be happening, isn't it?)

Alex

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476058.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



Re: [Neo4j] zero fromDepth and toDepth

2011-11-02 Thread Peter Neubauer
Mmmh,
let me do a testcase on this ... can you raise an issue?

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 8:04 PM, Alex a...@auv.name wrote:
 That sounds a bit bizarre: in my code, fromDepth(n)  toDepth(n) seems to be
 working like atDepth(n) if n0 (that's what should be happening, isn't it?)

 Alex

 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476058.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


Re: [Neo4j] zero fromDepth and toDepth

2011-11-02 Thread Alex
Done:

http://neo4jdb.lighthouseapp.com/projects/77609-neo4j-community/tickets/17-consisnte-behavior-of-fromdepth-todepth-and-atdepth

there's a typo in the title... time to get some sleep :)

Alex

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476080.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