public class BDVectorTools extends Object
| Constructor and Description |
|---|
BDVectorTools() |
| Modifier and Type | Method and Description |
|---|---|
static BigDecimalVector |
add(BigDecimalVector v1,
BigDecimalVector v2)
Performs an addition of two double vectors.
|
static boolean |
hasValidValues(BigDecimalVector vector)
Tests if all values in the vector are valid.
|
static void |
init(BigDecimalVector vector,
BigDecimal initValue)
Initialises the vector with a given value.
|
static BigDecimalVector |
mean(Collection<BigDecimalVector> vectors)
Computes the mean vector of a set of vectors.
|
static BigDecimalVector |
normalize(BigDecimalVector vector)
Normalises a vector (LP norm is used).
|
static BigDecimal |
normLP(BigDecimalVector vector)
Computes the LP norm of the vector.
|
static BigDecimalVector |
scalarDiv(BigDecimalVector vector,
int divisor)
Computes the scalar division of a double vector.
|
static BigDecimalVector |
sum(Collection<BigDecimalVector> vectors)
Computes the sum of a collection of double vectors.
|
public static BigDecimalVector add(BigDecimalVector v1, BigDecimalVector v2)
v1 - the first vector.v2 - the second vector.public static void init(BigDecimalVector vector, BigDecimal initValue)
vector - the vector to be initialised.initValue - the initialisation value.public static BigDecimalVector scalarDiv(BigDecimalVector vector, int divisor)
vector - the vector.divisor - the divisor.public static BigDecimalVector sum(Collection<BigDecimalVector> vectors)
vectors - a collection of double vectors.public static BigDecimalVector mean(Collection<BigDecimalVector> vectors)
vectors - the collection of double vectors whose mean vector has to be computed.public static BigDecimal normLP(BigDecimalVector vector)
vector - the vector to compute the LP norm.public static BigDecimalVector normalize(BigDecimalVector vector)
vector - the vector to be normalised.public static boolean hasValidValues(BigDecimalVector vector)
vector - the vector to test.Copyright © 2007-2012 Global Information Systems Group, ETH Zurich. All Rights Reserved.