dataStructures
Class SparseMatrixAsExtendedArrayList

java.lang.Object
  |
  +--dataStructures.SparseMatrixAsExtendedArrayList

public class SparseMatrixAsExtendedArrayList
extends java.lang.Object


Constructor Summary
SparseMatrixAsExtendedArrayList(int theRows, int theColumns, int estimatedMaxSize, java.lang.Object theZero)
           
SparseMatrixAsExtendedArrayList(int theRows, int theColumns, java.lang.Object theZero)
          use a default estimated maximum size of 1
SparseMatrixAsExtendedArrayList(java.lang.Object theZero)
          defaults are rows = cols = estimatedMaxSize = 1
 
Method Summary
 SparseMatrixAsExtendedArrayList add(SparseMatrixAsExtendedArrayList m)
           
static SparseMatrixAsExtendedArrayList input(java.lang.Object theZero, MyInputStream stream)
          input a sparse matrix into this from the given input stream
static void main(java.lang.String[] args)
          test program
 java.lang.String toString()
          convert the matrix into a string so it can be output
 SparseMatrixAsExtendedArrayList transpose()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SparseMatrixAsExtendedArrayList

public SparseMatrixAsExtendedArrayList(int theRows,
                                       int theColumns,
                                       int estimatedMaxSize,
                                       java.lang.Object theZero)

SparseMatrixAsExtendedArrayList

public SparseMatrixAsExtendedArrayList(int theRows,
                                       int theColumns,
                                       java.lang.Object theZero)
use a default estimated maximum size of 1

SparseMatrixAsExtendedArrayList

public SparseMatrixAsExtendedArrayList(java.lang.Object theZero)
defaults are rows = cols = estimatedMaxSize = 1
Method Detail

toString

public java.lang.String toString()
convert the matrix into a string so it can be output
Overrides:
toString in class java.lang.Object

input

public static SparseMatrixAsExtendedArrayList input(java.lang.Object theZero,
                                                    MyInputStream stream)
input a sparse matrix into this from the given input stream

transpose

public SparseMatrixAsExtendedArrayList transpose()
Returns:
the transpose of this matrix values are not cloned

add

public SparseMatrixAsExtendedArrayList add(SparseMatrixAsExtendedArrayList m)
Returns:
this + m

main

public static void main(java.lang.String[] args)
test program