lima.mathematical.factorisation.quadraticsieve
Class SparseMatrix

java.lang.Object
  |
  +--lima.mathematical.factorisation.quadraticsieve.SparseMatrix

public class SparseMatrix
extends java.lang.Object

A class to represent sparse matrices with entries type short, zero default Note that the height, but not the width is fixed.


Constructor Summary
SparseMatrix(lima.mathematical.factorisation.quadraticsieve.QuadraticSieveAlg qs, int cols)
          Construct a new SpareMatrix object
 
Method Summary
 void addRow2Row(int rowToAdd, int resultRow)
           
 void deleteRow(int row)
           
 int getEntry(int row, int col)
           
 int getHeight()
          Gets the height of the matrix
 int[][] getIndicies()
          Gets the indicies 2D array
 int[] getRowIndicies(int row)
          Get a row's indexes
 int[] getRowValues(int row)
          Get a row's values
 int[][] getValues()
          Gets the values 2D array
 int getWidth()
          Gets the width of the matrix
 boolean insertRow(int[] indexes, int[] values, lima.mathematical.factorisation.quadraticsieve.QuadraticSieveAlg qs, java.math.BigInteger forSqVector)
          Insert new row values
 void printRow(int row)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SparseMatrix

public SparseMatrix(lima.mathematical.factorisation.quadraticsieve.QuadraticSieveAlg qs,
                    int cols)
Construct a new SpareMatrix object

Method Detail

getRowValues

public int[] getRowValues(int row)
Get a row's values

Parameters:
row - - the row's values to get, indexed at 0

getRowIndicies

public int[] getRowIndicies(int row)
Get a row's indexes

Parameters:
row - - the row's values to get, indexed at 0

getWidth

public int getWidth()
Gets the width of the matrix


getHeight

public int getHeight()
Gets the height of the matrix


getValues

public int[][] getValues()
Gets the values 2D array


getIndicies

public int[][] getIndicies()
Gets the indicies 2D array


insertRow

public boolean insertRow(int[] indexes,
                         int[] values,
                         lima.mathematical.factorisation.quadraticsieve.QuadraticSieveAlg qs,
                         java.math.BigInteger forSqVector)
                  throws java.lang.Exception
Insert new row values

Parameters:
indexes - - array of indexes with non-zero entries
values - - values corresponding to the indexes
java.lang.Exception

printRow

public void printRow(int row)

deleteRow

public void deleteRow(int row)

addRow2Row

public void addRow2Row(int rowToAdd,
                       int resultRow)

getEntry

public int getEntry(int row,
                    int col)
             throws java.lang.Exception
java.lang.Exception