it.unitn.disi.smatch.data.matrices
Interface IMatchMatrix

All Known Implementing Classes:
JavaSparseArray, MatchMatrix, SparseMatrixChar

public interface IMatchMatrix

An interface to a matrix with matching results.

Author:
Mikalai Yatskevich mikalai.yatskevich@comlab.ox.ac.uk, Aliaksandr Autayeu avtaev@gmail.com

Method Summary
 void endOfRow()
          Signals end of row for a CRS scheme.
 char getElement(int x, int y)
          Returns an element.
 int getX()
          Returns row count.
 int getY()
          Returns column count.
 void init(int x, int y)
          Inits a matrix x rows per y columns.
 void init(int x, int y, int num_nz)
          Inits a matrix x rows per y columns with a max of num_nz non-zero elements.
 void setElement(int x, int y, char value)
          Sets an element.
 

Method Detail

init

void init(int x,
          int y)
Inits a matrix x rows per y columns.

Parameters:
x - rows count
y - column count

init

void init(int x,
          int y,
          int num_nz)
Inits a matrix x rows per y columns with a max of num_nz non-zero elements.

Parameters:
x - rows count
y - column count
num_nz - amount of non-zero elements

endOfRow

void endOfRow()
Signals end of row for a CRS scheme.


getElement

char getElement(int x,
                int y)
Returns an element.

Parameters:
x - row
y - column
Returns:
an element value

setElement

void setElement(int x,
                int y,
                char value)
Sets an element.

Parameters:
x - row
y - column
value - a new element value

getX

int getX()
Returns row count.

Returns:
row count

getY

int getY()
Returns column count.

Returns:
column count


© 2010 Knowdive @ DISI