public class Vectorz extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
TEST_EPSILON
Constant tolerance used for testing double values
|
| Constructor and Description |
|---|
Vectorz() |
| Modifier and Type | Method and Description |
|---|---|
static double |
averageSquaredDifference(AVector a,
AVector b) |
static double |
averageValue(AVector v) |
static AVector |
axisVector(int axisIndex,
int dimensions) |
static void |
copy(AVector source,
int srcOffset,
AVector dest,
int destOffset,
int length) |
static AVector |
create(AVector vector) |
static AVector |
create(double... data) |
static AVector |
create(DoubleBuffer d)
Create a vector from a DoubleBuffer
Note: consumes all doubles from the buffer
|
static AVector |
create(Iterable<Object> d)
Create a vector from an arbitrary iterable object
|
static AVector |
create(IVector vector) |
static AVector |
create(List<Object> d)
Create a vector from a list of numerical values (objects should be java.lang.Number instances)
|
static AVector |
create(Object o) |
static AVector |
createMutableVector(AVector t) |
static AVector |
createRange(int length) |
static AVector |
createSameSize(AVector v) |
static AVector |
createUniformRandomVector(int dimensions) |
static AVector |
createZeroVector(int length) |
static void |
fillBinaryRandom(AVector v) |
static void |
fillBinaryRandom(AVector v,
double prob) |
static void |
fillGaussian(AVector v) |
static void |
fillGaussian(AVector v,
double mean,
double sd) |
static void |
fillIndexes(AVector v)
Fills a vector with index values
|
static void |
fillRandom(AVector v) |
static AVector |
immutableZeroVector(int dimensions)
Returns an immutable vector of zeros
|
static int |
indexOfMaxValue(AVector v) |
static int |
indexOfMinValue(AVector v)
Returns the index of the minimum-valued component in a vector
|
static void |
invSqrt(AVector v) |
static void |
invSqrt(Vector v) |
static AVector |
join(AVector... vectors) |
static AVector |
join(AVector first,
AVector second)
Creates a joined vector that refers to the two underlying vectors
|
static AVector |
join(List<AVector> vectors) |
static double |
maxValue(AVector v) |
static double |
minValue(AVector v)
Returns the minimum-valued component in a vector
|
static AVector |
newVector(int length)
Returns a vector filled with zeros of the specified length.
|
static AVector |
parse(String ednString)
Parse a vector in edn format
|
static double |
rmsDifference(AVector a,
AVector b) |
static double |
totalValue(AVector v) |
static AVector |
toVector(Object o)
Coerce to AVector
|
static Vector |
wrap(double[] data) |
static AVector |
wrap(double[][] data) |
static AVector |
wrap(double[] data,
int offset,
int length) |
public static final double TEST_EPSILON
public static AVector create(double... data)
public static AVector join(AVector first, AVector second)
first - second - public static AVector createZeroVector(int length)
public static Vector wrap(double[] data)
public static AVector wrap(double[][] data)
public static AVector wrap(double[] data, int offset, int length)
public static AVector newVector(int length)
length - public static void copy(AVector source, int srcOffset, AVector dest, int destOffset, int length)
public static AVector createUniformRandomVector(int dimensions)
public static AVector immutableZeroVector(int dimensions)
dimensions - public static AVector parse(String ednString)
ednString - public static AVector create(List<Object> d)
public static AVector create(DoubleBuffer d)
public static AVector create(Iterable<Object> d)
d - public static double minValue(AVector v)
v - public static int indexOfMinValue(AVector v)
v - public static double maxValue(AVector v)
public static int indexOfMaxValue(AVector v)
public static void invSqrt(AVector v)
public static void invSqrt(Vector v)
public static double totalValue(AVector v)
public static double averageValue(AVector v)
public static void fillRandom(AVector v)
public static void fillGaussian(AVector v)
public static void fillIndexes(AVector v)
v - public static void fillGaussian(AVector v, double mean, double sd)
public static void fillBinaryRandom(AVector v)
public static AVector axisVector(int axisIndex, int dimensions)
public static void fillBinaryRandom(AVector v, double prob)
public static AVector createRange(int length)
Copyright © 2013. All Rights Reserved.