Fork me on GitHub

@blueberry my whole point is that Neanderthal could and probably should be the direct byte buffer backed core.matrix implementation. Do have any reason not to make it into a core.matrix implementation?


I started in a similar position: I needed a pure-JVM matrix implementation in Clojure so I wrote vectorz-clj


But then I realized that it would be far better for the ecosystem if we created a standard API that would support multiple different implementations. That was how core.matrix was born


I then retro-fitted vectorz-clj to work with core.matrix. It was really easy: only took an hour or two to get it working and maybe a couple of days to add some optimised fast paths for the other protocols. You could do exactly the same with Neanderthal


I strongly encourage you to try out the same approach.... it would be great if we can maintain compatibility across the various tools in the ecosystem


For example, you could then just do (set-current-implementation :neanderthal) if you want to use Neanderthal as the matrix librray for Incanter


mikera: thank you for pointing out the core.matrix API information to support Java 2D vectors as core.matrix objects. I will go over that.


(set-current-implementation :neanderthal) sounds great 😇


@tnoda no problem. Note that core.matrix already supports 2D double arrays in a sense, you can do stuff like


=> (def da (clojure.core.matrix.impl.double-array/to-double-arrays [[1 2] [3 4]])) #'clojure.core.matrix/da => da [[1.0, 2.0], [3.0, 4.0]] => (class da) [[D => (mul da 3) [[3.0 6.0] [9.0 12.0]]


The main reason for specialised protocol implementations for double[][] instances would be to boost performance for these cases


@mikera It's very fortunate that it is that easy and requires only a couple of hours since I'm sure someone will found spare time to do it ;)


find, that is :)