mikera / vectorz-clj

Fast matrix and vector maths library for Clojure - as a core.matrix implementation
202 stars 19 forks source link

Implementation for PSolveLinear and PLeastSquares #37

Closed prasant94 closed 10 years ago

mikera commented 10 years ago

I think there should be at least an avector-coerce in the protocol implementations? You can't guarantee that the input will always be an AVector (might be a Clojure vector, for example).

Good to have a test or two that check this behaviour.

mikera commented 10 years ago

(.asVector (matrix [[4 -1 2]])) is better written as (array [4 -1 2])

prasant94 commented 10 years ago

is this good?

mikera commented 10 years ago

Looks better!

You should remove the ^AVector type hints - these might cause a problem if the argument isn't actually an AVector.

Also can you add a test case that uses Clojure vectors, just to ensure that the averctor-coerce is working as intended? This stuff is a bit fiddly to get correct, so good to have extra tests.

mikera commented 10 years ago

@Prasant94 did you amend this yet? Would be good to get merged in before GSoC ends!

prasant94 commented 10 years ago

We'll need a vectorz release for this. I am sending a PR over there.

prasant94 commented 10 years ago

This can be merged now

mikera commented 10 years ago

Looks good!