it.unitn.disi.smatch.data.matrices
Class MatchMatrix

java.lang.Object
  extended by it.unitn.disi.smatch.data.matrices.MatchMatrix
All Implemented Interfaces:
IMatchMatrix

public class MatchMatrix
extends java.lang.Object
implements IMatchMatrix

Default matrix for matching results.

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

Constructor Summary
MatchMatrix()
           
 
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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MatchMatrix

public MatchMatrix()
Method Detail

init

public void init(int x,
                 int y)
Description copied from interface: IMatchMatrix
Inits a matrix x rows per y columns.

Specified by:
init in interface IMatchMatrix
Parameters:
x - rows count
y - column count

init

public void init(int x,
                 int y,
                 int num_nz)
Description copied from interface: IMatchMatrix
Inits a matrix x rows per y columns with a max of num_nz non-zero elements.

Specified by:
init in interface IMatchMatrix
Parameters:
x - rows count
y - column count
num_nz - amount of non-zero elements

endOfRow

public void endOfRow()
Description copied from interface: IMatchMatrix
Signals end of row for a CRS scheme.

Specified by:
endOfRow in interface IMatchMatrix

getElement

public char getElement(int x,
                       int y)
Description copied from interface: IMatchMatrix
Returns an element.

Specified by:
getElement in interface IMatchMatrix
Parameters:
x - row
y - column
Returns:
an element value

setElement

public void setElement(int x,
                       int y,
                       char value)
Description copied from interface: IMatchMatrix
Sets an element.

Specified by:
setElement in interface IMatchMatrix
Parameters:
x - row
y - column
value - a new element value

getX

public int getX()
Description copied from interface: IMatchMatrix
Returns row count.

Specified by:
getX in interface IMatchMatrix
Returns:
row count

getY

public int getY()
Description copied from interface: IMatchMatrix
Returns column count.

Specified by:
getY in interface IMatchMatrix
Returns:
column count

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


© 2010 Knowdive @ DISI