JavaView© v3.95.000

jvx.numeric
Class PnJacobi

java.lang.Object
  extended byjvx.numeric.PnJacobi

public class PnJacobi
extends java.lang.Object

Compute eigenvectors and eigenvalues of a given matrix and store in result vectors.


Field Summary
static int FAILURE
          Return value of computation method if failure.
static int INTERRUPTED
          Return value of computation method if interrupted from outside.
 
Constructor Summary
PnJacobi()
           
 
Method Summary
static int computeEigenvectors(PdMatrix mat, int dim, PdVector eValue, PdVector[] eVector)
          Compute eigenvectors and eigenvalues of a given matrix and store in result vectors.
static int fcomputeEigenvectors(PdMatrix mat, int dim, PdVector eValue, PdVector[] eVector)
          Compute eigenvectors and eigenvalues of a given matrix and store in result vectors.
static boolean isInterrupted()
          Get flag if the previous computation was interrupted from outside.
static void printEigenvalues(int dim, PdVector eValue)
           
static void printEigenvectors(int dim, PdVector eValue, PdVector[] eVector)
           
static void setInterrupted(boolean flag)
          Flag set from outside to interrupt the current computation.
static boolean test(PdMatrix mat, int dim, PdVector eValue, PdVector[] eVector)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FAILURE

public static final int FAILURE
Return value of computation method if failure.

See Also:
Constant Field Values

INTERRUPTED

public static final int INTERRUPTED
Return value of computation method if interrupted from outside.

See Also:
Constant Field Values
Constructor Detail

PnJacobi

public PnJacobi()
Method Detail

setInterrupted

public static void setInterrupted(boolean flag)
Flag set from outside to interrupt the current computation. When a computation method is called then this flag is reset.


isInterrupted

public static boolean isInterrupted()
Get flag if the previous computation was interrupted from outside. Call this method after computeEigenvectors.


computeEigenvectors

public static int computeEigenvectors(PdMatrix mat,
                                      int dim,
                                      PdVector eValue,
                                      PdVector[] eVector)
Compute eigenvectors and eigenvalues of a given matrix and store in result vectors. Method modifies the original matrix for internal use.

This method uses double-precision. See fcomputeEigenvectors which uses float-precision.

Parameters:
mat - Matrix whose eigenvalues and -vectors should be computed.
dim - Size of square matrix, length of vectors
eValue - Vector to store the computed eigenvalues
eVector - Array of vectors to store the computed eigenvectors
Returns:
Number of used iterations, or -1 if failure or -2 if interrupted.

fcomputeEigenvectors

public static int fcomputeEigenvectors(PdMatrix mat,
                                       int dim,
                                       PdVector eValue,
                                       PdVector[] eVector)
Compute eigenvectors and eigenvalues of a given matrix and store in result vectors. Method modifies the original matrix for internal use.

This method uses float-precision. See computeEigenvectors which uses double-precision.

Parameters:
mat - Matrix whose eigenvalues and -vectors should be computed.
dim - Size of square matrix, length of vectors
eValue - Vector to store the computed eigenvalues
eVector - Array of vectors to store the computed eigenvectors
Returns:
Number of used iterations, or -1 if failure or -2 if interrupted.

printEigenvectors

public static void printEigenvectors(int dim,
                                     PdVector eValue,
                                     PdVector[] eVector)

printEigenvalues

public static void printEigenvalues(int dim,
                                    PdVector eValue)

test

public static boolean test(PdMatrix mat,
                           int dim,
                           PdVector eValue,
                           PdVector[] eVector)

JavaView© v3.95.000

The software JavaView© is copyright protected. All Rights Reserved.