The core.matrix API should be 100% pure Clojure. Some of the implementations are JVM specific however (e.g. support for fast operations on Java double arrays etc.)
So... it probably needs a bit of hacking to make it work on ClojureScript with some form of conditional compilation setup. If anyone fancies taking that on, I'd be happy to support. On Thursday, 30 May 2013 06:19:02 UTC+8, Brian Craft wrote: > > This looks useful. Is it tied to jvm? > > On Tuesday, May 28, 2013 6:21:30 PM UTC-7, Mikera wrote: >> >> On Wednesday, 29 May 2013 02:19:41 UTC+8, Brian Craft wrote: >> >>> Are there any existing libs for the evaluation of math expressions? For >>> example, if the user enters "x + sin(y)", parse and evaluate the >>> expression, given vectors of floats for x and y. >> >> >> You can evaluate expressions like this right now in core.matrix if you >> don't mind Lisp notation: >> >> (use 'clojure.core.matrix) >> (use 'clojure.core.matrix.operators) ;; override +, -, == etc. >> >> (def x [1 2 3 4 5 6 7]) >> (def y [0 1 2 3 4 5 6]) >> (+ x (sin y)) >> => [1.0 2.8414709848078967 3.909297426825682 4.141120008059867 >> 4.243197504692072 5.041075725336862 6.720584501801074] >> >> To enable this to handle regular infix maths expressions, it should be >> fairly easy to layer an Instaparse parser on top of this. >> >> Also, one of our newly accepted GSoC students (Maik Schünemann) is >> looking at a library for expressing, manipulating and evaluating symbolic >> maths expressions. Some initial experiments here: >> >> https://github.com/clojure-numerics/expresso >> >> Once this is complete, it should be possible to simply such expressions, >> compute symbolic derivatives etc. >> >> >> >> >> -- -- 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 Note that posts from new members are moderated - please be patient with your first post. 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.