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

JBLAS()


daxpy(int, double, double[], double[])
 Perform vector operation: y = a*x + y

daxpy(int, double, double[], double[], int)
 Perform vector operation: y = a*x + y, beginining at
an offset different than zero.

daxpy(int, double, double[], int, double[], int)
 Perform vector operation: y = a*x + y, begining at
different offsets for x and y.

daxpy(int, double, double[][], int, double[])
 Perform vector operation: y = a*x + y, where x is a column of
a matrix.

daxpy(int, double, double[][], int, double[][], int)
 Perform vector operation: y = a*x + y, where x and y are columns of
a matrix.

ddot(int, double[], double[])
 Perform vector operation: y = a*x + y

ddot(int, double[], double[], int)
 Perform vector operation: y = a*x + y

insert_copy(double[][], double[][])
 Copying array elements into prexisitng array.

LowerTriangularSolve(double[][], double[])


minus(double[], double[])


mult(double[][], double[])


new_copy(double[])


new_copy(double[][])


new_copy(int[])


norm2(double[])


plus(double[], double[])


UpperTriangularSolve(double[][], double[])

JBLAS
public JBLAS()
plus
public static final double[] plus(double x[],
double y[])
minus
public static final double[] minus(double x[],
double y[])
norm2
public static final double norm2(double x[])
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
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
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
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
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
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
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
LowerTriangularSolve
public static final double[] LowerTriangularSolve(double A[][],
double b[])
UpperTriangularSolve
public static final double[] UpperTriangularSolve(double A[][],
double b[])
mult
public static final double[] mult(double A[][],
double x[])
new_copy
public static double[] new_copy(double x[])
new_copy
public static int[] new_copy(int x[])
new_copy
public static double[][] new_copy(double A[][])
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