2010/6/7 Mark Engelberg <[email protected]>: > Yes, but in (some versions of) Scheme, (sqrt -1) yields i. > > Representing complex numbers and just doing math between two complex > numbers is not the problem. Retrofitting Clojure math so that all > operations work on the entire numeric tower, allowing you to > seamlessly manipulate complex and non-complex numbers together, is > non-trivial.
I saw a java library for image processing (or ND-tensor processing, rather) where they are doing just that. Each data point is wrapped in a "type", and operations occur at the level of types (so different types know how to deal with each other): http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=imglib.git (There's a tiny tutorial on basics here: http://pacific.mpi-cbg.de/Imglib ) Albert -- http://albert.rierol.net -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
