Re: java interop: passing int[]

2013-07-22 Thread Mikera
You can use vectorz-clj if you want fast double[] vector and matrix operations on the JVM. https://github.com/mikera/vectorz-clj It's basically a comprehensive wrapper over almost everything you might possibly want to do with Java double[] arrays, but wrapped up behind the core.matrix API so t

Re: java interop: passing int[]

2013-07-21 Thread Alex Fowler
Hmmm, true about proxies.. as for hiphip - I did not use it yet, but I thought that it may be useful for fast array operations, sorry confused the posts :) I gonna try it sometime I think.. and I think that it has no built-in matrix ops, but there was a library somewhere that did matrix ops..

Re: java interop: passing int[]

2013-07-20 Thread Brian Craft
I've been looking at hiphip, though it's not clear to me how it's related to h2 user functions. ;) It wasn't immediately clear to me if hiphip handles multidimensional matix operations. On Saturday, July 20, 2013 9:32:50 AM UTC-7, Alex Fowler wrote: > > BTW, take a look > http://blog.getprisma

Re: java interop: passing int[]

2013-07-20 Thread Brian Craft
I don't think proxy creates a named class, though. I believe h2 looks up user functions via a string naming the class. On Saturday, July 20, 2013 9:31:38 AM UTC-7, Alex Fowler wrote: > > So, out of what you're saying - you want to implement an interface, > without adding new methods - I strongly

Re: java interop: passing int[]

2013-07-20 Thread Alex Fowler
So, out of what you're saying - you want to implement an interface, without adding new methods - I strongly suggest using proxy and delegate all the type-resolution hassle to JVM (just rely on it). If you are really sure you need specifying types explicitly, then use type hints and dedicated cl

Re: java interop: passing int[]

2013-07-20 Thread Alex Fowler
BTW, take a look http://blog.getprismatic.com/blog/2013/7/10/introducing-hiphip-array-fast-and-flexible-numerical-computation-in-clojure суббота, 20 июля 2013 г., 17:42:36 UTC+4 пользователь Brian Craft написал: > > I'm trying to write a user function for h2. I think that means I need > gen-clas

Re: java interop: passing int[]

2013-07-20 Thread Cedric Greevey
That would specify an array of boxed ints. If you want an array of primitive ints, I think that's [I instead. On Sat, Jul 20, 2013 at 9:42 AM, Brian Craft wrote: > I'm trying to write a user function for h2. I think that means I need > gen-class, but I'm extremely fuzzy on how java class loadin

Re: java interop: passing int[]

2013-07-20 Thread Brian Craft
I'm trying to write a user function for h2. I think that means I need gen-class, but I'm extremely fuzzy on how java class loading works. Perhaps my question is moot, because I just ran across this obscure note in a gen-class example: ;; declare only new methods, not superclass methods If I'm

Re: java interop: passing int[]

2013-07-20 Thread Alex Fowler
Some questions to clarify things up: Do you mean - how do you create that type of value or how do you generatte a method that accepts that very type? Are you sure you need to use gen-class and not proxy or reify? суббота, 20 июля 2013 г., 7:28:03 UTC+4 пользователь Brian Craft написал: > > For

java interop: passing int[]

2013-07-19 Thread Brian Craft
For implementing a method with this signature int getType(int[] inputTypes) How would I declare inputTypes in gen-class? -- -- 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 pos