Re: Directed Graphs for Contrib

2009-02-24 Thread Tobias Ivarsson
On Feb 24, 1:33 am, Jeff Rose wrote: > > That would be great.  Especially if the algorithms can operate over some > kind of generalized interface, so the algorithms can run over different > graph implementations.  I'm writing a semi-structured storage library on > top of the neo4j graph database,

Re: Directed Graphs for Contrib

2009-02-23 Thread Jeffrey Straszheim
I did make one important update. The nodes no longer need to be integers. You can build a graph of nodes and adjacency lists without the pain of mapping to indexes. Also, the "adjacency lists" can be a provided map, or any function from node->neighbors. (The fact that Clojure maps are functions

Re: Directed Graphs for Contrib

2009-02-23 Thread Jeffrey Straszheim
It would be easy to convert from your form to adjacency lists, so if you want it write a converter :) I think we should keep the algorithms *basically* efficient. I don't see that as premature optimization at all. On Mon, Feb 23, 2009 at 9:37 PM, Eric wrote: > > > > On Feb 23, 6:38 pm, Jeffrey

Re: Directed Graphs for Contrib

2009-02-23 Thread Eric
On Feb 23, 6:38 pm, Jeffrey Straszheim wrote: > Well, right now I'm just handling directed graphs, and basically treating > nodes as integer indexes, with a simple formula from index to adjacency list > of nodes. > I would actually like to see an implementation that more closely resembles the

Re: Directed Graphs for Contrib

2009-02-23 Thread Jeffrey Straszheim
Well, right now I'm just handling directed graphs, and basically treating nodes as integer indexes, with a simple formula from index to adjacency list of nodes. I'm not opposed to a more elaborate implementation. Patch welcome :) On Mon, Feb 23, 2009 at 7:33 PM, Jeff Rose wrote: > > Jeffrey St

Re: Directed Graphs for Contrib

2009-02-23 Thread Jeff Rose
Jeffrey Straszheim wrote: > As part of my Datalog work I'm putting together some directed graph > algorithms, mostly things like finding strongly connected components, > and building dependency stratifications (think topological sort but with > the results groups in tiers of non-interdependent

Re: Directed Graphs for Contrib

2009-02-23 Thread Jeffrey Straszheim
I don't remember that post, but my work also deals with cycles, and a strongly connected component algorithm will be one of my first submissions. On Mon, Feb 23, 2009 at 10:52 AM, cliffc wrote: > > As a compiler writer I do a lot of graph-work, but nearly all of it > has cycles. > There was a th

Re: Directed Graphs for Contrib

2009-02-23 Thread cliffc
As a compiler writer I do a lot of graph-work, but nearly all of it has cycles. There was a thread earlier about defining cyclic graphs in Clojure. Can someone point me to it? Thanks, Cliff On Feb 22, 7:55 am, Rich Hickey wrote: > On Feb 22, 2009, at 10:11 AM, Jeffrey Straszheim wrote: > > > J

Re: Directed Graphs for Contrib

2009-02-23 Thread Francesco Bellomi
I agree -- an important goal is to define a suitable common way to represent graphs in terms of idiomatic Clojure data structures. Francesco On Feb 22, 4:11 pm, Jeffrey Straszheim wrote: > Just as a point of fact, I don't plan to make a complete *every algorithm > you can think of* package, jus

Re: Directed Graphs for Contrib

2009-02-23 Thread Konrad Hinsen
On 22.02.2009, at 02:59, Jeffrey Straszheim wrote: > As part of my Datalog work I'm putting together some directed graph > algorithms, mostly things like finding strongly connected > components, and building dependency stratifications (think > topological sort but with the results groups in

Re: Directed Graphs for Contrib

2009-02-22 Thread Frantisek Sodomka
Graphs has always inspired me and seeing implementation in Clojure will be no less inspiring. http://www.visualcomplexity.com/vc/ http://planarity.net/ Frantisek On 22 Ún, 16:11, Jeffrey Straszheim wrote: > Just as a point of fact, I don't plan to make a complete *every algorithm > you can thi

Re: Directed Graphs for Contrib

2009-02-22 Thread Rich Hickey
On Feb 22, 2009, at 10:11 AM, Jeffrey Straszheim wrote: > Just as a point of fact, I don't plan to make a complete *every > algorithm you can think of* package, just the ones I need. However, > it would be easy to add others submitted by the community. I could > be a gathering place of g

Re: Directed Graphs for Contrib

2009-02-22 Thread Jeffrey Straszheim
Just as a point of fact, I don't plan to make a complete *every algorithm you can think of* package, just the ones I need. However, it would be easy to add others submitted by the community. I could be a gathering place of graph algorithms. On Sun, Feb 22, 2009 at 7:31 AM, Francesco Bellomi < fr

Re: Directed Graphs for Contrib

2009-02-22 Thread Francesco Bellomi
+1 Francesco On Feb 22, 2:59 am, Jeffrey Straszheim wrote: > As part of my Datalog work I'm putting together some directed graph > algorithms, mostly things like finding strongly connected components, and > building dependency stratifications (think topological sort but with the > results group

Re: Directed Graphs for Contrib

2009-02-22 Thread MattH
+1! That'd be really useful. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsub

Re: Directed Graphs for Contrib

2009-02-22 Thread Timothy Pratley
+1 :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com

Re: Directed Graphs for Contrib

2009-02-22 Thread Frantisek Sodomka
+1 on that! Graphs are common and many people are going to write similar algorithms to yours. Also, as a library, it is going to have nice interface (than if put together with Datalog) and will be much easier to reuse. Frantisek PS: Graphs are my favorite data structure, so I am lobbying for th

Directed Graphs for Contrib

2009-02-21 Thread Jeffrey Straszheim
As part of my Datalog work I'm putting together some directed graph algorithms, mostly things like finding strongly connected components, and building dependency stratifications (think topological sort but with the results groups in tiers of non-interdependent nodes). Anyhow, I'm thinking this stu