-
Notifications
You must be signed in to change notification settings - Fork 46
Getting started
Mike Anderson edited this page Aug 28, 2013
·
9 revisions
You need to have the Vectorz
library .jar and all its dependencies on your classpath if you want to use Vectorz.
The easiest way to do this is to use Maven (or a similar dependency manager like Leiningen) to download the latest Vectorz release from the Clojars repository.
If you want to download the dependencies manually, you can get them directly from the Clojars repository
mikera.vectorz.Vector
is the most basic type in Vectorz
- it represents a 1D vector of double values.
import mikera.vectorz.*;
...
Vector v=Vector.of(1,2,3,4);
double sum=v.elementSum(); // => 10.0
There are a lot of helpful static factory methods in the following classes:
- mikera.vectorz.Vectorz
- mikera.matrixx.Matrixx
- mikera.arrayz.Arrayz
Example usage:
Matrix m = Matrix.createSquareMatrix(10); // => 10x10 square matrix, initially filled with zeros