Modifier and Type | Method and Description |
---|---|
static DoubleVector |
add(DoubleVector vector1,
DoubleVector vector2)
Adds the second
DoubleVector to the first DoubleVector
and returns the result. |
static IntegerVector |
add(IntegerVector vector1,
IntegerVector vector2)
Adds the second
IntegerVector to the first IntegerVector
and returns the result. |
static Vector |
add(Vector vector1,
Vector vector2)
Adds the second
Vector to the first Vector and returns
the result. |
static DoubleVector |
addUnmodified(DoubleVector vector1,
DoubleVector vector2)
Returns a new
DoubleVector which is the summation of vector2 and vector1 . |
static IntegerVector |
addUnmodified(IntegerVector vector1,
IntegerVector vector2)
Returns a new
IntegerVector which is the summation of vector2 and vector1 . |
static Vector |
addUnmodified(Vector vector1,
Vector vector2)
Returns a new
Vector which is the summation of vector2
and vector1 . |
static Vector |
addWithScalars(DoubleVector vector1,
double weight1,
DoubleVector vector2,
double weight2)
Adds two
DoubleVector s with some scalar weight for each DoubleVector . |
static Vector |
addWithScalars(IntegerVector vector1,
int weight1,
IntegerVector vector2,
int weight2)
Adds two
IntegerVector s with some scalar weight for each Vector . |
static Vector |
addWithScalars(Vector vector1,
double weight1,
Vector vector2,
double weight2)
Adds two
Vector s with some scalar weight for each Vector . |
static double |
dotProduct(DoubleVector a,
DoubleVector b)
Computes the dot product,
a Tb of the two
vectors. |
static int |
dotProduct(IntegerVector a,
IntegerVector b)
Computes the dot product,
a Tb of the two
vectors. |
static double |
dotProduct(Vector x,
Vector y)
Computes the dot product,
x Ty of the two
vectors. |
static DoubleVector |
multiply(DoubleVector left,
DoubleVector right)
Multiply the values in
left and right and store the
product in left . |
static IntegerVector |
multiply(IntegerVector left,
IntegerVector right)
Multiply the values in
left and right and store the
product in left . |
static Vector |
multiply(Vector left,
Vector right)
Mulitplies the values in
left and right and store the
product in left . |
static DoubleVector |
multiplyUnmodified(DoubleVector left,
DoubleVector right)
Multiply the values in
left and right and store the
product in a new Vector . |
static SparseDoubleVector |
multiplyUnmodified(SparseDoubleVector a,
SparseDoubleVector b)
Multiply the values in
a and b and store the
product in a new CompactSparseVector This is an element by
element multiplication. |
static DoubleVector |
subtract(DoubleVector vector1,
DoubleVector vector2)
Subtracts the second
DoubleVector from the first DoubleVector and returns the result. |
static IntegerVector |
subtract(IntegerVector vector1,
IntegerVector vector2)
Subtracts the second
IntegerVector from the first IntegerVector and returns the result. |
static Vector |
subtract(Vector vector1,
Vector vector2)
Subtracts the second
Vector fromt the first Vector and
returns the result. |
public static Vector add(Vector vector1, Vector vector2)
Vector
to the first Vector
and returns
the result.vector1
- The destination vector to be summed onto.vector2
- The source vector to sum from.vector2
.public static DoubleVector add(DoubleVector vector1, DoubleVector vector2)
DoubleVector
to the first DoubleVector
and returns the result.vector1
- The destination vector to be summed onto.vector2
- The source vector to sum from.vector2
.public static IntegerVector add(IntegerVector vector1, IntegerVector vector2)
IntegerVector
to the first IntegerVector
and returns the result.vector1
- The destination vector to be summed onto.vector2
- The source vector to sum from.vector2
.public static Vector addUnmodified(Vector vector1, Vector vector2)
Vector
which is the summation of vector2
and vector1
.vector1
- The first vector to used in a summation.vector2
- The second vector to be used in a summation.vector2
.public static DoubleVector addUnmodified(DoubleVector vector1, DoubleVector vector2)
DoubleVector
which is the summation of vector2
and vector1
.vector1
- The first vector to used in a summation.vector2
- The second vector to be used in a summation.vector2
.public static IntegerVector addUnmodified(IntegerVector vector1, IntegerVector vector2)
IntegerVector
which is the summation of vector2
and vector1
.vector1
- The first vector to used in a summation.vector2
- The second vector to be used in a summation.vector1
and vector2
.public static Vector addWithScalars(Vector vector1, double weight1, Vector vector2, double weight2)
Vector
s with some scalar weight for each Vector
.vector1
- The vector values should be added to.weight1
- The weight of values in vector1
vector2
- The vector values that should be added to vector1
weight2
- The weight of values in vector2
{@code
- vector1}public static Vector addWithScalars(DoubleVector vector1, double weight1, DoubleVector vector2, double weight2)
DoubleVector
s with some scalar weight for each DoubleVector
.vector1
- The vector values should be added to.weight1
- The weight of values in vector1
vector2
- The vector values that should be added to vector1
weight2
- The weight of values in vector2
{@code
- vector1}public static Vector addWithScalars(IntegerVector vector1, int weight1, IntegerVector vector2, int weight2)
IntegerVector
s with some scalar weight for each Vector
.vector1
- The vector values should be added to.weight1
- The weight of values in vector1
vector2
- The vector values that should be added to vector1
weight2
- The weight of values in vector2
{@code
- vector1}public static double dotProduct(Vector x, Vector y)
x
Ty
of the two
vectors.x
- the left vector that will be transposedy
- the right vectorIllegalArgumentException
- if the two vectors are not of equal
lengthpublic static double dotProduct(DoubleVector a, DoubleVector b)
a
Tb
of the two
vectors.a
- the left vector that will be transposedb
- the right vectorIllegalArgumentException
- if the two vectors are not of equal
lengthpublic static int dotProduct(IntegerVector a, IntegerVector b)
a
Tb
of the two
vectors.a
- the left vector that will be transposedb
- the right vectorIllegalArgumentException
- if the two vectors are not of equal
lengthpublic static Vector multiply(Vector left, Vector right)
left
and right
and store the
product in left
. This is an element by element multiplication.left
- The left Vector
to multiply, and contain the result
values.right
- The right Vector
to multiply.left
and right
public static DoubleVector multiply(DoubleVector left, DoubleVector right)
left
and right
and store the
product in left
. This is an element by element multiplication.left
- The left Vector
to multiply, and contain the result
values.right
- The right Vector
to multiply.left
and right
public static SparseDoubleVector multiplyUnmodified(SparseDoubleVector a, SparseDoubleVector b)
a
and b
and store the
product in a new CompactSparseVector
This is an element by
element multiplication.a
- The left Vector
to multiplyb
- The right Vector
to multiply.left
and right
public static IntegerVector multiply(IntegerVector left, IntegerVector right)
left
and right
and store the
product in left
. This is an element by element multiplication.left
- The left Vector
to multiply, and contain the result
values.right
- The right Vector
to multiply.left
and right
public static DoubleVector multiplyUnmodified(DoubleVector left, DoubleVector right)
left
and right
and store the
product in a new Vector
. This is an element by element
multiplication.left
- The left Vector
to multiply.right
- The right Vector
to multiply.left
and right
public static Vector subtract(Vector vector1, Vector vector2)
Vector
fromt the first Vector
and
returns the result.vector1
- The destination vector to be subtracted from.vector2
- The source vector to subtract.vector1
.public static DoubleVector subtract(DoubleVector vector1, DoubleVector vector2)
DoubleVector
from the first DoubleVector
and returns the result.vector1
- The destination vector to be subtracted from.vector2
- The source vector to subtract.vector1
.public static IntegerVector subtract(IntegerVector vector1, IntegerVector vector2)
IntegerVector
from the first IntegerVector
and returns the result.vector1
- The destination vector to be subtracted from.vector2
- The source vector to subtract.vector1
.Copyright © 2012. All Rights Reserved.