non/spire — pull request #64 by tixxit (2013-02-03 05:03:18+00:00)
Title: Vector space reorganization, new macros and random forest example.

This is a bit diverse of a changeset. This includes:

Vector space type class reorganization. Most important, CoordinateSpaces now exist and we have instances for Seq-likes and Arrays. Also, InnerProductSpace extends VectorSpace now, not NormedVectorSpace. This gives us a dot product without requiring an NRoot. However, if an NRoot exists, then we can get an implicit instance of NormedVectorSpace (w/ (`x dot x).sqrt` as the norm).

There are 2 new macros. They are used to convert the RHS to a compatible type before applying an op. What this really means is that:

def twice[A: Ring](a: A) = a * 2

No longer boxes. The macro will call fromInt on the 2nd implicit (to *) first before applying *. It actually just calls from{TypeName} for whatever type is on the right.

A new Random Forest example exists now too. It can do both classification and regression and the example will cross-validate with 3 different data sets. It's quite nifty.

One note, I tried to specialize this example, but couldn't. The examples just wouldn't use the @spec'd variants. @non -- I'm sure I've missed something important. Could you take a look whenever you have some free time?