Clojure for Tajan's Algorithm uploaded here
http://clojure.googlegroups.com/web/tarjan.clj?gsc=yOHJ-CEAAAB3Fq8nFW3O6gqQkWXH_xrOYRvSPFZyhAT412614U6EGkzfKN-m9S9niuHrq-IEXAE

- aria

On Dec 26, 6:30 am, aria42 <ari...@gmail.com> wrote:
> Hi all,
>   I'm just getting started with clojure from a functional background,
> and while I like playing with clojure and accomplishing script like
> tasks, I have no experience with anything larger than about 20 lines.
> I wanted to try to take something with "alot of state" and put it into
> clojure. I decided to code Tarjan's Algorithm for finding all the
> strongly connected components of a graph (http://en.wikipedia.org/wiki/
> Tarjan's_strongly_connected_components_algorithm). I've written this
> code in Java and it's about a 100 lines. Sadly, my clojure version is
> about a 100 lines too. I am more-or-less translating my java code
> (which is more or less translated from Psuedo-Code), but I don't see a
> good way to make this problem more functional, but this is probably
> due to my imperative roots.
>
>   I have the code posted as an attachment here or posted 
> athttp://www.cs.berkeley.edu/~aria42/tarjan.clj.
>
>   Let me know if there's more canonical / functional ways to do
> something like this.
>
>   Thanks, Aria
--~--~---------~--~----~------------~-------~--~----~
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
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to