drasys.or.matrix
Class CompressedMatrix

java.lang.Object
  |
  +--drasys.or.matrix.RealContainer
        |
        +--drasys.or.matrix.Matrix
              |
              +--drasys.or.matrix.CompressedMatrix
Direct Known Subclasses:
CompressedColumnMatrix, CompressedRowMatrix

public abstract class CompressedMatrix
extends Matrix
implements SizableMatrixI

Abstract base class for compressed matrices. A compressed matrix is a sparse matrix which stores only the non-null elements in the matrix. The values are stored in a single memory block and three additional memory blocks are used to store integer indices.

References:

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
Parallel Algorithms for Matrix Computations
    K.A. Gallivan / Paperback / Published 1990

See Also:
Serialized Form

Fields inherited from class drasys.or.matrix.RealContainer
_epsilon, _globalEpsilon
 
Constructor Summary
CompressedMatrix()
           
CompressedMatrix(double epsilon)
           
CompressedMatrix(double[][] array)
           
CompressedMatrix(double[][] array, double epsilon)
           
 
Method Summary
 double[] getValueArray()
          Returns the internal array that is used to hold the element values.
 void setCapacityOfElements(int capacityOfElements)
          Allocates memory so the matrix can hold this many elements without reallocating memory.
 void setElements(double value)
          Sets the value of all the non-null elements.
 int sizeOfColumns()
          Returns the number of columns in the matrix.
 int sizeOfRows()
          Returns the number of rows in the matrix.
 
Methods inherited from class drasys.or.matrix.Matrix
columnElements, elements, equals, equals, getArray, rowElements, setColumn, setDiagonal, setElements, setRow, sum, sum, sum, sumOfSquaredDifferences, sumOfSquaredDifferences, sumOfSquaredDifferences, sumOfSquares, sumOfSquares, sumOfSquares, toString
 
Methods inherited from class drasys.or.matrix.RealContainer
equals, getEpsilon, getGlobalEpsilon, setEpsilon, setGlobalEpsilon
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompressedMatrix

public CompressedMatrix()

CompressedMatrix

public CompressedMatrix(double epsilon)

CompressedMatrix

public CompressedMatrix(double[][] array,
                        double epsilon)

CompressedMatrix

public CompressedMatrix(double[][] array)
Method Detail

setCapacityOfElements

public void setCapacityOfElements(int capacityOfElements)
Allocates memory so the matrix can hold this many elements without reallocating memory.

setElements

public void setElements(double value)
Sets the value of all the non-null elements.

getValueArray

public double[] getValueArray()
Returns the internal array that is used to hold the element values.

sizeOfRows

public int sizeOfRows()
Returns the number of rows in the matrix.

sizeOfColumns

public int sizeOfColumns()
Returns the number of columns in the matrix.


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