Class VisualNumerics.math.DoubleVector
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class VisualNumerics.math.DoubleVector

java.lang.Object
   |
   +----VisualNumerics.math.DoubleVector

public final class DoubleVector
extends Object
Double precision vector manipulation functions. This class cannot be instantiated.

Method Index

 o add(double, double[])
Add a scalar to each element of the vector.
 o add(double[], double[])
Calculate the sum of two vectors, v1 + v2.
 o infinityNorm(double[])
Calculate the infinity norm of a vector.
 o innerProduct(double[], double[])
Calculate the dot product of two vectors.
 o multiply(double, double[])
Multiply a vector by a scalar.
 o multiply(double[], double[])
Calculate the product of corresponding elements in the input vectors.
 o oneNorm(double[])
Calculate the one norm of a vector.
 o product(double[])
Calculate the product of the array elements.
 o subtract(double[], double[])
Calculate the difference between corresponding elements of two vectors, v1 - v2.
 o sum(double[])
Calculate the sum of the array elements.
 o twoNorm(double[])
Calculate the Euclidean or two norm of a vector.

Constructors

 o DoubleVector
  public DoubleVector()

Methods

 o sum
  public static double sum(double a[])
Calculate the sum of the array elements.
Parameters:
a - A vector with elements of type double.
Returns:
A double value equal to the sum of the array elements.
 o product
  public static double product(double a[])
Calculate the product of the array elements.
Parameters:
a - A vector with elements of type double.
Returns:
A double value equal to the product of the array elements.
 o innerProduct
  public static double innerProduct(double a[],
                                    double b[])
Calculate the dot product of two vectors.
Parameters:
a - A vector with elements of type double.
b - A vector with elements of type double.
Returns:
A double value equal to the dot product of the two vectors.
 o oneNorm
  public static double oneNorm(double a[])
Calculate the one norm of a vector.
Parameters:
a - A vector with elements of type double.
Returns:
A double value equal to the sum of the absolute values of the elements.
 o twoNorm
  public static double twoNorm(double a[])
Calculate the Euclidean or two norm of a vector.
Parameters:
a - A vector with elements of type double.
Returns:
A double value equal to its Euclidean norm.
 o infinityNorm
  public static double infinityNorm(double a[])
Calculate the infinity norm of a vector.
Parameters:
a - A vector with elements of type double.
Returns:
A double value equal to the maximum of the absolute values of the elements of the array.
 o add
  public static double[] add(double a,
                             double v[])
Add a scalar to each element of the vector.
Parameters:
a - An input double scalar value.
v - A vector with elements of type double.
Returns:
A double vector whose elements contain the sum of a and each element of v.
 o add
  public static double[] add(double v1[],
                             double v2[])
Calculate the sum of two vectors, v1 + v2.
Parameters:
v1 - A vector with elements of type double.
v2 - A vector with elements of type double.
Returns:
A double vector containing the elementwise sum of the input vectors.
Throws: IllegalArgumentException
This exception is thrown when the input vectors do not have the same length.
 o subtract
  public static double[] subtract(double v1[],
                                  double v2[])
Calculate the difference between corresponding elements of two vectors, v1 - v2.
Parameters:
v1 - A vector with elements of type double.
v2 - A vector with elements of type double.
Returns:
A double vector whose elements are differences between corresponding elements of the input vectors.
Throws: IllegalArgumentException
This exception is thrown when the input vectors do not have the same length.
 o multiply
  public static double[] multiply(double da,
                                  double v[])
Multiply a vector by a scalar.
Parameters:
da - An input double value used for scaling the elements of the vector.
v - An input vector with elements of type double.
Returns:
A double vector where each component is a product of da and the corresponding element of the input vector.
 o multiply
  public static double[] multiply(double v1[],
                                  double v2[])
Calculate the product of corresponding elements in the input vectors.
Parameters:
v1 - A vector with elements of type double.
v2 - A vector with elements of type double.
Returns:
A double vector whose components are elementwise products of the input vectors.
Throws: IllegalArgumentException
This exception is thrown when the input vectors do not have the same length.

All Packages  Class Hierarchy  This Package  Previous  Next  Index