[Neo4j] DefaultExpander.java replacement?

2010-06-23 Thread Paddy
Hi, DefaultExpander.java was removed from the latest build https://trac.neo4j.org/changeset/4590 How can i get the example from github working without the DefaultExpander ? http://github.com/neo4j-examples/java-astar-routing DefaultExpander relExpander = new DefaultExpander(); relExpander.add( R

Re: [Neo4j] DefaultExpander.java replacement?

2010-06-23 Thread Tobias Ivarsson
It should use the factory methods in TraversalFactory instead. How come we exposed DefaultExpander to begin with? Wasn't that class just supposed to be an implementation detail? The fact that it had the weird behavior of expanding all RelationshipTypes when it was empty turns on the "implementati

Re: [Neo4j] building utilities from svn source (maven + windows x64)

2010-06-23 Thread Дмитрий Медведев
I have just downloaded source from svn from scratch. Magic. It now works. Obviously, I am missing something... Best Regards, Dmitry N. Medvedev, Tel.: +7 (903) 506 0376 E-mail: dmitry.medve...@gmail.com ___ Neo4j mailing list User@lists.neo4j.org https

Re: [Neo4j] DefaultExpander.java replacement?

2010-06-23 Thread Anders Nawroth
Hi! The example has been updated accordingly: http://github.com/neo4j-examples/java-astar-routing Will keep track on when it breaks the next time :-) /anders On 06/23/2010 09:55 AM, Tobias Ivarsson wrote: > It should use the factory methods in TraversalFactory instead. > > How come we exposed D

Re: [Neo4j] building utilities from svn source (maven + windows x64)

2010-06-23 Thread Anders Nawroth
Nice to hear it's working now. Maybe Maven just had a bad day ;-) /anders On 06/23/2010 10:04 AM, Дмитрий Медведев wrote: > I have just downloaded source from svn from scratch. Magic. It now works. > Obviously, I am missing something... > > Best Regards, > Dmitry N. Medvedev, > > Tel.: > +7 (903

Re: [Neo4j] Index Performance(Was: Event framework has landed)

2010-06-23 Thread Mattias Persson
I think the lucene test is flawed since it never returns any results in lookup method. That's why it's so fast :) 2010/6/22 Atle Prange > Started a new thread since the old got a bit long, if you want to > catch up read the thread "The event framework has landed". > > Okay, i changed the tests t

[Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Tobias Ivarsson
Hi Neo4j enthusiasts! Yesterday I committed an API that Mattias and I have been working on for a few days. It comes in the form of two new interfaces Expander and Expansion (in the org.neo4j.graphdb package), and four new methods in the Node interface (method names starting with "expand"). The tw

Re: [Neo4j] Can we commit at regular intervals in batch insert mode

2010-06-23 Thread Mattias Persson
2010/6/23 Suruchi Deodhar > Hi Mattias, > > Replying to your query on the forum. > > Could you copy-paste the exact command line to start java? I'd like to > see if there's some tyop with the heap size option. > > > I typed following command for execution.: > /usr/java/default/bin/java -Xmx2048M

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Alex Averbuch
Hi Tobias, It seems as though the new changes have broken the AStar code I'm using. I use: neo4j-apoc 1.1-SNAPSHOT neo4j-graph-algo 0.5-SNAPSHOT AStar uses DefaultExpander and can no longer find it. Here's an example of the code that worked until now. DefaultExpander relExpander = new DefaultEx

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Anders Nawroth
Hi! See: http://www.mail-archive.com/user@lists.neo4j.org/msg04044.html /anders On 06/23/2010 03:44 PM, Alex Averbuch wrote: > Hi Tobias, > It seems as though the new changes have broken the AStar code I'm using. > > I use: > neo4j-apoc 1.1-SNAPSHOT > neo4j-graph-algo 0.5-SNAPSHOT > > AStar uses

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Mattias Persson
Also, the latest graph-algo is 0.6-SNAPSHOT... so use that instead 2010/6/23 Anders Nawroth > Hi! > > See: > http://www.mail-archive.com/user@lists.neo4j.org/msg04044.html > > /anders > > On 06/23/2010 03:44 PM, Alex Averbuch wrote: > > Hi Tobias, > > It seems as though the new changes have brok

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Alex Averbuch
Hi guys, thanks! I've pulled the latest java-astar-routing and looking at it now. Have changed to SNAPSHOT 0.6 too. Has the AStar algorithm been changed to use the Traversal framework now? If so, is there any way I can use the old AStar version? The last one required neo4j-apoc 1.1-SNAPSHOT & ne

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Mattias Persson
It works with graph-algo 0.6-SNAPSHOT and there's an AStar.java (which is the "old" version) and one ExperimentalAStar.java which uses the new traversal framework. 2010/6/23 Alex Averbuch > Hi guys, > thanks! > > I've pulled the latest java-astar-routing and looking at it now. > Have changed to

[Neo4j] Traverser optimization

2010-06-23 Thread Marius Kubatz
Hi, I have a question regarding traverser, is there a way how I can optimize my code to use it? Problem is: my use case is a dense graph with a lot of relationships... So most of the time I have one node with thousands of relationships attached. I have tested my code on the following Graph: 1 roo

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Alex Averbuch
Sweet, Experiments are running fine again. Thanks for the quick help! Alex On Wed, Jun 23, 2010 at 4:17 PM, Mattias Persson wrote: > It works with graph-algo 0.6-SNAPSHOT and there's an AStar.java (which is > the "old" version) and one ExperimentalAStar.java which uses the new > traversal framew

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Tobias Ivarsson
Did anyone have an opinion on what to call the methods on the Expansion interface that specify which types to expand. Alternative 1) Expansion and( RelationshipType type ); Expansion and( RelationshipType type, Direction direction ); Expansion not( RelationshipType type ); Examples: for (Node nod

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Alex Averbuch
Hi, Personally I'd prefer and/not. It's intuitive to any programmer and has the bonus of being much shorter, so long complex expansions will appear less messy in practice. On Wed, Jun 23, 2010 at 5:45 PM, Tobias Ivarsson < tobias.ivars...@neotechnology.com> wrote: > Did anyone have an opinion on

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Craig Taverner
I like this new API. It is a tiny first step towards making the Java API a little more DSL-like (1% of the way to the current scala and ruby API's :-) My vote is actually for the includes() approach only because *and* is such a widely used keyword. However, a quick test in Ruby showed that while i

[Neo4j] Dijkstra Algorithm - Access to previous edges

2010-06-23 Thread Bruno Santos
Hi, I have a graph representing a public transport network and I need to aggravate the cost of a certain edge based on the previous chosen edge. Can I do this with the Dijkstra algorithm in the Graph - Algo package? I did not find anything pointing in that direction in the javadocs. Thanks, Bruno

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Tobias Ivarsson
On Wed, Jun 23, 2010 at 6:10 PM, Craig Taverner wrote: > > (I also noticed that reading the examples with and() correctly indicates > that the order of definition is irrelevant, while includes() almost implies > that the first relationship type has some kind of precedence. Could it?) I get that

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Craig Taverner
Why not have includes() return the same instance with internal state changed, then the various call options are equivalent. On Jun 23, 2010 6:41 PM, "Tobias Ivarsson" < tobias.ivars...@neotechnology.com> wrote: On Wed, Jun 23, 2010 at 6:10 PM, Craig Taverner wrote: > > (I also noticed that r...

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Tobias Ivarsson
Because mutable objects are evil. It would for example make it impossible to write classes like this: class Person { private final Expansion friends; Person(Node node) { this.friends = node.expand( FRIEND ).nodes(); } Iterable getFriends() { return persons( friends

Re: [Neo4j] Can we commit at regular intervals in batch insert mode

2010-06-23 Thread Suruchi Deodhar
Hi Mattias, Thanks for your answers. Sorry for the confusion wrt the java execution command. I saved CLASSPATH in .bashrc file and ran following command. /usr/java/default/bin/java -Xmx2048M BuildGraph In response to your question "Do you really need to iterate over all nodes in your queries? Th

Re: [Neo4j] bus timetable with neo4j

2010-06-23 Thread Paddy
Hi Mattias, I'm having trouble implementing the timetable node, what way would the timetable data be stored in the node to allow for traversal based on time? Would i need a timetable node for each stop or for each route. At the moment i have relationships between each connecting stop node with cost

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Craig Taverner
Mutable objects have their issues, and yet this is a common and popular paradigm in DSL design. I guess however the point with a DSL is that it is so simple and limited that it compensates for the potential risks. Similar to the dynamic versus static language argument. Now there are ways to reduce

[Neo4j] Good documentation system anyone?

2010-06-23 Thread Peter Neubauer
Hi all, I just want to reach out on an issue that has been buggering me for at least 10 years. Since I started writing software, the documentation part has always been a philosophic problem. Do you keep it as part of the build system, using formats that are diff-able, compilable and have a CLI lik

Re: [Neo4j] bus timetable with neo4j

2010-06-23 Thread Craig Taverner
This is an interesting problem. I'm not totally sure I've followed the entire discussion, but here are my thoughts. Your model is divided into two levels: - Core model, with routes that specify the bus routes, times between stops and locations. For example we can say that bus 5 stops at sto

Re: [Neo4j] Index Performance(Was: Event framework has landed)

2010-06-23 Thread Atle Prange
Hm, i'll have to fix that... Any thoughts on a Trie implementation? Would it be able to compete? atle On Wed, Jun 23, 2010 at 11:04 AM, Mattias Persson wrote: > I think the lucene test is flawed since it never returns any results in > lookup method. That's why it's so fast :) > > 2010/6/22 A

Re: [Neo4j] New tentative API in trunk: Expander/Expansion

2010-06-23 Thread Tobias Ivarsson
The problem with the code below is that once you've used the Person.getFriends(minAge)-method once, the friends-expansion will have that filter added to it forever (if it's mutable), and that means that you will never be able to get the younger friends of that person. However, reusing an expansion