Hi all,

I am trying to use the core.matrix.complex 
<https://github.com/mikera/core.matrix.complex/blob/master/src/main/clj/clojure/core/matrix/complex.clj>
 library 
to do matrix multiplication and such with complex numbers, but I cannot get 
it to work. The library uses complex.core 
<https://github.com/alanforr/complex/blob/master/src/complex/core.clj> to 
define and manipulate complex numbers, and core.matrix 
<https://github.com/mikera/core.matrix> to do matrix arithmetic.

Using matrix multiplication, mmul, as an example, I can require core.matrix 
as mat, and then do (mat/mmul matrix1 matrix2) and it works no problem. 
However, if I require core.matrix.complex and then try to do mmul, the 
function is undefined. Naturally, I tried requiring them both and using 
them together, but if I do (mat/mmul cmat1 cmat2), where cmat means a 
complex matrix, I get a "ClassCastException 
org.apache.commons.math3.complex.Complex cannot be cast to java.lang.Number"

I am not that familiar with protocols and deftype, so I haven't been able 
to decipher the library and how it's supposed to be used. Can anyone help 
me?

-- 
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/d/optout.

Reply via email to