drasys.or.linear.blas
Class VectorBLAS1

java.lang.Object
  |
  +--drasys.or.linear.blas.VectorBLAS1

public class VectorBLAS1
extends java.lang.Object

BLAS1 layer that operates on contiguous vectors. For a traditional and more feature rich implementation of the BLAS see BLAS1, BLAS2 and BLAS3.

References:

Linear Algebra and Its Applications
    Gilbert Strang / Hardcover / Published 1988
Matrix Computations (Johns Hopkins Studies in the Mathematical Sciences)
    Gene H. Golub, Charles F. Van Loan (Contributor) / Paperback / Published 1996
Numerical Recipes in C : The Art of Scientific Computing
    William H. Press, et al / Hardcover / Published 1993


Constructor Summary
VectorBLAS1()
          Create a vector BLAS with the default BLAS implementation and a base index of '0'.
VectorBLAS1(int base)
          Create a vector BLAS with a default BLAS implementation and an explicit base index.
VectorBLAS1(int base, BLAS1I blas1)
          Create a vector BLAS with an explicit BLAS implementation and an explicit base index.
 
Method Summary
 double dasum(ContiguousVectorI x)
          Computes the sum of the absolute values.
 void daxpy(double a, ContiguousVectorI x, ContiguousVectorI y)
          Constant times a vector plus a vector.
Y = Y + a * X
 void dcopy(ContiguousVectorI x, ContiguousVectorI y)
          Copies vector x to vector y.
Y = X;
 double ddot(ContiguousVectorI x, ContiguousVectorI y)
          Computes the dot product of two vectors.
Y = X .
 double dnrm2(ContiguousVectorI x)
          Computes the euclidean norm of the vector.
 void drot(ContiguousVectorI x, ContiguousVectorI y, double cos, double sin)
          Applies a plane rotation.
 void dscal(double a, ContiguousVectorI x)
          Scale a vector by a constant.
X = a * X
 void dswap(ContiguousVectorI x, ContiguousVectorI y)
          Interchange two vectors.
X <-> Y
 int idamax(ContiguousVectorI x)
          Finds the index of the element with the maximum absolute value.
 void zaxpy(ComplexI a, ContiguousVectorI x, ContiguousVectorI y)
          Constant times a vector plus a vector.
Y = Y + a * X
 void zcopy(ContiguousVectorI x, ContiguousVectorI y)
          Copies vector x to vector y.
Y = X;
 Complex zdotc(ContiguousVectorI x, ContiguousVectorI y, Complex results)
          Computes the dot product of two vectors: alpha = conjugate(x) (.) y.
 Complex zdotu(ContiguousVectorI x, ContiguousVectorI y, Complex results)
          Computes the dot product of two vectors: alpha = x (.) y.
 void zscal(ComplexI a, ContiguousVectorI x)
          Scale a vector by a constant.
X = a * X
 void zswap(ContiguousVectorI x, ContiguousVectorI y)
          Interchange two vectors.
X <-> Y
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorBLAS1

public VectorBLAS1()
Create a vector BLAS with the default BLAS implementation and a base index of '0'. All computations will use elements A[0...(nrow-1)][0...(ncol-1)].

VectorBLAS1

public VectorBLAS1(int base)
Create a vector BLAS with a default BLAS implementation and an explicit base index. Typically 'base' will be '0' or '1'. All computations will use elements A[base...(nrow-1)][base...(ncol-1)].

VectorBLAS1

public VectorBLAS1(int base,
                   BLAS1I blas1)
Create a vector BLAS with an explicit BLAS implementation and an explicit base index. Typically 'base' will be '0' or '1'. All computations will use elements A[base...(nrow-1)][base...(ncol-1)].
Method Detail

dasum

public double dasum(ContiguousVectorI x)
             throws BlasException
Computes the sum of the absolute values.

daxpy

public void daxpy(double a,
                  ContiguousVectorI x,
                  ContiguousVectorI y)
           throws BlasException
Constant times a vector plus a vector.
Y = Y + a * X

dcopy

public void dcopy(ContiguousVectorI x,
                  ContiguousVectorI y)
           throws BlasException
Copies vector x to vector y.
Y = X;

ddot

public double ddot(ContiguousVectorI x,
                   ContiguousVectorI y)
            throws BlasException
Computes the dot product of two vectors.
Y = X . Y

drot

public void drot(ContiguousVectorI x,
                 ContiguousVectorI y,
                 double cos,
                 double sin)
          throws BlasException
Applies a plane rotation.

dscal

public void dscal(double a,
                  ContiguousVectorI x)
           throws BlasException
Scale a vector by a constant.
X = a * X

dswap

public void dswap(ContiguousVectorI x,
                  ContiguousVectorI y)
           throws BlasException
Interchange two vectors.
X <-> Y

dnrm2

public double dnrm2(ContiguousVectorI x)
             throws BlasException
Computes the euclidean norm of the vector.

idamax

public int idamax(ContiguousVectorI x)
           throws BlasException
Finds the index of the element with the maximum absolute value.

zaxpy

public void zaxpy(ComplexI a,
                  ContiguousVectorI x,
                  ContiguousVectorI y)
           throws BlasException
Constant times a vector plus a vector.
Y = Y + a * X

zcopy

public void zcopy(ContiguousVectorI x,
                  ContiguousVectorI y)
           throws BlasException
Copies vector x to vector y.
Y = X;

zdotu

public Complex zdotu(ContiguousVectorI x,
                     ContiguousVectorI y,
                     Complex results)
              throws BlasException
Computes the dot product of two vectors: alpha = x (.) y.

zdotc

public Complex zdotc(ContiguousVectorI x,
                     ContiguousVectorI y,
                     Complex results)
              throws BlasException
Computes the dot product of two vectors: alpha = conjugate(x) (.) y.

zscal

public void zscal(ComplexI a,
                  ContiguousVectorI x)
           throws BlasException
Scale a vector by a constant.
X = a * X

zswap

public void zswap(ContiguousVectorI x,
                  ContiguousVectorI y)
           throws BlasException
Interchange two vectors.
X <-> Y


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com