hu.elte.matrix
Class Matrix

java.lang.Object
  extended by hu.elte.matrix.Matrix

public class Matrix
extends java.lang.Object

Egy A×B matrixot reprezental. Az implementacio sorfolytonos egydimenzios tombot hasznal.


Constructor Summary
Matrix(int width, int height)
          Letrehoz egy uj matrix peldanyt megadott width szelesseggel es height magassaggal.
 
Method Summary
 int getElement(int row, int column)
          Visszaadja a megadott oszlop- es sorindexen allo elemet a matrixnak.
 int getHeight()
           
 int getWidth()
           
 void setElement(int element, int row, int column)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Matrix

public Matrix(int width,
              int height)
Letrehoz egy uj matrix peldanyt megadott width szelesseggel es height magassaggal.

Parameters:
width - matrix oszlopainak szama (legalabb 1)
height - matrix sorainak szama (legalabb 1)
Method Detail

getElement

public int getElement(int row,
                      int column)
Visszaadja a megadott oszlop- es sorindexen allo elemet a matrixnak.

Parameters:
row - a sor indexe (1-tol kezdve)
column - az oszlop indexe (1-tol kezdve)
Returns:
a megadott helyen allo elem

setElement

public void setElement(int element,
                       int row,
                       int column)

getWidth

public int getWidth()

getHeight

public int getHeight()

toString

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