All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jnt.linear_algebra.JBLAS

java.lang.Object
   |
   +----jnt.linear_algebra.JBLAS

public class JBLAS
extends Object
BETA VERSION INCOMPLETE AND SUBJECT TO CHANGE.

Simple kernels of the Basic Linear Algebra Subprograms (BLAS) in Java.

Note: These routines retain the functionality as the original Fortran BLAS, but some of the parameters have been changed due to the characteristics of the Java language.

For example, the increment parameters used to denote strides is no longer necessary. This was originally used to access row vectors (column vectors in C), but no longer applies, since Java arrays may not have their rows stored contiguously.

Also, passing a subvector (or submatrix) into routines cannot be accomplished by merely passing the location of the array, as it is done in C and Fortran. Instead the whole array, and its offsets need to be passed separately.

Version:
0.20
Author:
Roldan Pozo, NIST

Constructor Index

 o JBLAS()

Method Index

 o daxpy(int, double, double[], double[])
Perform vector operation: y = a*x + y
 o daxpy(int, double, double[], double[], int)
Perform vector operation: y = a*x + y, beginining at an offset different than zero.
 o daxpy(int, double, double[], int, double[], int)
Perform vector operation: y = a*x + y, begining at different offsets for x and y.
 o daxpy(int, double, double[][], int, double[])
Perform vector operation: y = a*x + y, where x is a column of a matrix.
 o daxpy(int, double, double[][], int, double[][], int)
Perform vector operation: y = a*x + y, where x and y are columns of a matrix.
 o ddot(int, double[], double[])
Perform vector operation: y = a*x + y
 o ddot(int, double[], double[], int)
Perform vector operation: y = a*x + y
 o insert_copy(double[][], double[][])
Copying array elements into prexisitng array.
 o LowerTriangularSolve(double[][], double[])
 o minus(double[], double[])
 o mult(double[][], double[])
 o new_copy(double[])
 o new_copy(double[][])
 o new_copy(int[])
 o norm2(double[])
 o plus(double[], double[])
 o UpperTriangularSolve(double[][], double[])

Constructors

 o JBLAS
 public JBLAS()

Methods

 o plus
 public static final double[] plus(double x[],
                                   double y[])
 o minus
 public static final double[] minus(double x[],
                                    double y[])
 o norm2
 public static final double norm2(double x[])
 o daxpy
 public static final void daxpy(int N,
                                double a,
                                double x[],
                                double y[])
Perform vector operation: y = a*x + y

Parameters:
N - use only first N elements from each vector
a - scalar
x - vector
y - vector
Returns:
the upated vector
 o daxpy
 public static final void daxpy(int N,
                                double a,
                                double x[][],
                                int col,
                                double y[])
Perform vector operation: y = a*x + y, where x is a column of a matrix.

Parameters:
N - use only first N elements from each vector
a - scalar
x - matrix (Java 2D array)
col - column of x to use
y - vector
Returns:
the upated vector
 o daxpy
 public static final void daxpy(int N,
                                double a,
                                double x[][],
                                int colx,
                                double y[][],
                                int coly)
Perform vector operation: y = a*x + y, where x and y are columns of a matrix.

Parameters:
N - use only first N elements from each vector
a - scalar
x - matrix (Java 2D array)
colx - column of x to use
y - vector
coly - column of y to use
Returns:
the upated vector
 o daxpy
 public static final void daxpy(int N,
                                double a,
                                double x[],
                                double y[],
                                int offset)
Perform vector operation: y = a*x + y, beginining at an offset different than zero.

Parameters:
N - use only N elements from each vector
a - scalar
x - vector
y - vector
offset - starting at this position
Returns:
the upated vector
 o daxpy
 public static final void daxpy(int N,
                                double a,
                                double x[],
                                int offsetx,
                                double y[],
                                int offsety)
Perform vector operation: y = a*x + y, begining at different offsets for x and y.

Parameters:
N - use only N elements from each vector
a - scalar
x - vector
offsetx - starting position for x vector
y - vector
offsety - starting position for y vector
Returns:
the upated vector
 o ddot
 public static final double ddot(int N,
                                 double x[],
                                 double y[])
Perform vector operation: y = a*x + y

Parameters:
N - use only first N elements from each vector
a - scalar
x - vector
y - vector
Returns:
the upated vector
 o ddot
 public static final double ddot(int N,
                                 double x[],
                                 double y[],
                                 int offset)
Perform vector operation: y = a*x + y

Parameters:
N - use only N elements from each vector
a - scalar
x - vector
y - vector
offset - starting position for each vector
Returns:
the upated vector
 o LowerTriangularSolve
 public static final double[] LowerTriangularSolve(double A[][],
                                                   double b[])
 o UpperTriangularSolve
 public static final double[] UpperTriangularSolve(double A[][],
                                                   double b[])
 o mult
 public static final double[] mult(double A[][],
                                   double x[])
 o new_copy
 public static double[] new_copy(double x[])
 o new_copy
 public static int[] new_copy(int x[])
 o new_copy
 public static double[][] new_copy(double A[][])
 o insert_copy
 public static void insert_copy(double B[][],
                                double A[][])
Copying array elements into prexisitng array. (Without allocation any new memory.) Arguments must be conformant.


All Packages  Class Hierarchy  This Package  Previous  Next  Index