Class JSci.maths.VectorMath
All Packages Class Hierarchy This Package Previous Next Index
Class JSci.maths.VectorMath
java.lang.Object
|
+----JSci.maths.VectorMath
- public final class VectorMath
- extends Object
The vector math library.
This class cannot be subclassed or instantiated because all methods are static.
-
add(ComplexVector, ComplexVector)
- Returns the addition of two vectors.
-
add(DoubleVector, DoubleVector)
- Returns the addition of two vectors.
-
add(IntegerVector, IntegerVector)
- Returns the addition of two vectors.
-
conjugate(ComplexVector)
- Returns the complex conjugate of a vector.
-
crossProduct(ComplexVector, ComplexVector)
- Returns the cross product of two 3D vectors.
-
crossProduct(DoubleVector, DoubleVector)
- Returns the cross product of two 3D vectors.
-
crossProduct(IntegerVector, IntegerVector)
- Returns the cross product of two 3D vectors.
-
mapComponents(ComplexVector, Mapping)
- Applies a function on all the vector components.
-
mapComponents(DoubleVector, Mapping)
- Applies a function on all the vector components.
-
mapComponents(IntegerVector, Mapping)
- Applies a function on all the vector components.
-
scalarDivide(ComplexVector, Complex)
- Returns the division of a vector by a scalar.
-
scalarDivide(DoubleVector, double)
- Returns the division of a vector by a scalar.
-
scalarDivide(IntegerVector, int)
- Returns the division of a vector by a scalar.
-
scalarMultiply(Complex, ComplexVector)
- Returns the multiplication of a vector by a scalar.
-
scalarMultiply(double, DoubleVector)
- Returns the multiplication of a vector by a scalar.
-
scalarMultiply(int, IntegerVector)
- Returns the multiplication of a vector by a scalar.
-
scalarProduct(ComplexVector, ComplexVector)
- Returns the scalar product of two vectors.
-
scalarProduct(DoubleVector, DoubleVector)
- Returns the scalar product of two vectors.
-
scalarProduct(IntegerVector, IntegerVector)
- Returns the scalar product of two vectors.
-
subtract(ComplexVector, ComplexVector)
- Returns the subtraction of two vectors.
-
subtract(DoubleVector, DoubleVector)
- Returns the subtraction of two vectors.
-
subtract(IntegerVector, IntegerVector)
- Returns the subtraction of two vectors.
conjugate
public static ComplexVector conjugate(ComplexVector v)
- Returns the complex conjugate of a vector.
- Parameters:
- v - a complex vector
add
public static IntegerVector add(IntegerVector a,
IntegerVector b)
- Returns the addition of two vectors.
- Parameters:
- a - an integer vector
- b - an integer vector
- Throws: VectorDimensionException
- If the vectors are different sizes.
add
public static DoubleVector add(DoubleVector a,
DoubleVector b)
- Returns the addition of two vectors.
- Parameters:
- a - a double vector
- b - a double vector
- Throws: VectorDimensionException
- If the vectors are different sizes.
add
public static ComplexVector add(ComplexVector a,
ComplexVector b)
- Returns the addition of two vectors.
- Parameters:
- a - a complex vector
- b - a complex vector
- Throws: VectorDimensionException
- If the vectors are different sizes.
subtract
public static IntegerVector subtract(IntegerVector a,
IntegerVector b)
- Returns the subtraction of two vectors.
- Parameters:
- a - an integer vector
- b - an integer vector
- Throws: VectorDimensionException
- If the vectors are different sizes.
subtract
public static DoubleVector subtract(DoubleVector a,
DoubleVector b)
- Returns the subtraction of two vectors.
- Parameters:
- a - a double vector
- b - a double vector
- Throws: VectorDimensionException
- If the vectors are different sizes.
subtract
public static ComplexVector subtract(ComplexVector a,
ComplexVector b)
- Returns the subtraction of two vectors.
- Parameters:
- a - a complex vector
- b - a complex vector
- Throws: VectorDimensionException
- If the vectors are different sizes.
scalarMultiply
public static IntegerVector scalarMultiply(int x,
IntegerVector a)
- Returns the multiplication of a vector by a scalar.
- Parameters:
- x - an integer
- a - an integer vector
scalarMultiply
public static DoubleVector scalarMultiply(double x,
DoubleVector a)
- Returns the multiplication of a vector by a scalar.
- Parameters:
- x - a double
- a - a double vector
scalarMultiply
public static ComplexVector scalarMultiply(Complex x,
ComplexVector a)
- Returns the multiplication of a vector by a scalar.
- Parameters:
- x - a complex number
- a - a complex vector
scalarDivide
public static IntegerVector scalarDivide(IntegerVector a,
int x)
- Returns the division of a vector by a scalar.
- Parameters:
- a - an integer vector
- x - an integer
scalarDivide
public static DoubleVector scalarDivide(DoubleVector a,
double x)
- Returns the division of a vector by a scalar.
- Parameters:
- a - a double vector
- x - a double
scalarDivide
public static ComplexVector scalarDivide(ComplexVector a,
Complex x)
- Returns the division of a vector by a scalar.
- Parameters:
- a - a complex vector
- x - a complex number
scalarProduct
public static int scalarProduct(IntegerVector a,
IntegerVector b)
- Returns the scalar product of two vectors.
- Parameters:
- a - an integer vector
- b - an integer vector
- Throws: VectorDimensionException
- If the vectors are different sizes.
scalarProduct
public static double scalarProduct(DoubleVector a,
DoubleVector b)
- Returns the scalar product of two vectors.
- Parameters:
- a - a double vector
- b - a double vector
- Throws: VectorDimensionException
- If the vectors are different sizes.
scalarProduct
public static Complex scalarProduct(ComplexVector a,
ComplexVector b)
- Returns the scalar product of two vectors.
- Parameters:
- a - a complex vector
- b - a complex vector
- Throws: VectorDimensionException
- If the vectors are different sizes.
crossProduct
public static IntegerVector crossProduct(IntegerVector a,
IntegerVector b)
- Returns the cross product of two 3D vectors.
- Parameters:
- a - an integer vector
- b - an integer vector
- Throws: VectorDimensionException
- If using incompatible vectors.
crossProduct
public static DoubleVector crossProduct(DoubleVector a,
DoubleVector b)
- Returns the cross product of two 3D vectors.
- Parameters:
- a - a double vector
- b - a double vector
- Throws: VectorDimensionException
- If using incompatible vectors.
crossProduct
public static ComplexVector crossProduct(ComplexVector a,
ComplexVector b)
- Returns the cross product of two 3D vectors.
- Parameters:
- a - a complex vector
- b - a complex vector
- Throws: VectorDimensionException
- If using incompatible vectors.
mapComponents
public static DoubleVector mapComponents(IntegerVector v,
Mapping f)
- Applies a function on all the vector components.
- Parameters:
- v - an integer vector
- f - a user-defined function
- Returns:
- a double vector
mapComponents
public static DoubleVector mapComponents(DoubleVector v,
Mapping f)
- Applies a function on all the vector components.
- Parameters:
- v - a double vector
- f - a user-defined function
- Returns:
- a double vector
mapComponents
public static ComplexVector mapComponents(ComplexVector v,
Mapping f)
- Applies a function on all the vector components.
- Parameters:
- v - a complex vector
- f - a user-defined function
- Returns:
- a complex vector
All Packages Class Hierarchy This Package Previous Next Index