topology
Class MatrixTopology

java.lang.Object
  extended by topology.MatrixTopology
All Implemented Interfaces:
TopologyModel

public class MatrixTopology
extends java.lang.Object
implements TopologyModel

Matric Topology is a topology where neurons is set in rows and columns.


Constructor Summary
MatrixTopology(int row, int col)
          Creates a new instance of matrixTopology with specified numbers of rows and columns.
MatrixTopology(int row, int col, int radius)
          Creates a new instance of matrixTopology with specified numbers of rows, columns and radius.
 
Method Summary
 int getColNumber()
          Return number of columns
 java.util.ArrayList getConnectedNeurons(int neuronNumber)
          Return ArrayList of neurons connected to neuron with neuron Number
 java.util.TreeMap getNeighbourhood(int neuronNumber)
          Return TreeMap containng information about neuron and distance to neuron for which neighbourhood is calculated
 Coords getNeuronCoordinate(int neuronNumber)
          Return Coord object contain intormation about neuron co-ordinate
 int getNeuronNumber(Coords coords)
          Return neuron number with specyfied co-ordiante
 int getNumbersOfNeurons()
          Return number of neuron.
 int getRadius()
          Return radius for calculate neighbourhood
 int getRowNumber()
          Return number of rows
 void setColNumber(int colNumber)
          Set number of columns
 void setRadius(int radius)
          Set radius
 void setRowNumber(int rowNumber)
          Set numbers of rows
 java.lang.String toString()
          Returns a string representation of the topology.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MatrixTopology

public MatrixTopology(int row,
                      int col)
Creates a new instance of matrixTopology with specified numbers of rows and columns. Radius is default set to 0

Parameters:
row - number of rows
col - number of columns

MatrixTopology

public MatrixTopology(int row,
                      int col,
                      int radius)
Creates a new instance of matrixTopology with specified numbers of rows, columns and radius.

Parameters:
row - number of rows
col - number of columns
radius - radius
Method Detail

toString

public java.lang.String toString()
Returns a string representation of the topology.
Neuron number nr is connected with: [ list of neurons ]

Specified by:
toString in interface TopologyModel
Overrides:
toString in class java.lang.Object
Returns:
string representation of the topology.

getColNumber

public int getColNumber()
Return number of columns

Specified by:
getColNumber in interface TopologyModel
Returns:
number of columns

getConnectedNeurons

public java.util.ArrayList getConnectedNeurons(int neuronNumber)
Return ArrayList of neurons connected to neuron with neuron Number

Specified by:
getConnectedNeurons in interface TopologyModel
Parameters:
neuronNumber - neuron number
Returns:
list of connected neurons
See Also:
ArrayList

getNeighbourhood

public java.util.TreeMap getNeighbourhood(int neuronNumber)
Return TreeMap containng information about neuron and distance to neuron for which neighbourhood is calculated

Specified by:
getNeighbourhood in interface TopologyModel
Parameters:
neuronNumber - neuron number
Returns:
Tree map containn neuron number and distance
See Also:
TreeMap

getNeuronCoordinate

public Coords getNeuronCoordinate(int neuronNumber)
Return Coord object contain intormation about neuron co-ordinate

Specified by:
getNeuronCoordinate in interface TopologyModel
Parameters:
neuronNumber - neuron number
Returns:
coords object

getNeuronNumber

public int getNeuronNumber(Coords coords)
Return neuron number with specyfied co-ordiante

Specified by:
getNeuronNumber in interface TopologyModel
Parameters:
coords - neuron coordinate
Returns:
neuron number

getNumbersOfNeurons

public int getNumbersOfNeurons()
Return number of neuron.

Specified by:
getNumbersOfNeurons in interface TopologyModel
Returns:
number of neurons

getRadius

public int getRadius()
Return radius for calculate neighbourhood

Specified by:
getRadius in interface TopologyModel
Returns:
radius

getRowNumber

public int getRowNumber()
Return number of rows

Specified by:
getRowNumber in interface TopologyModel
Returns:
numbers of rows

setColNumber

public void setColNumber(int colNumber)
Set number of columns

Specified by:
setColNumber in interface TopologyModel
Parameters:
colNumber - numbers of columns

setRadius

public void setRadius(int radius)
Set radius

Specified by:
setRadius in interface TopologyModel
Parameters:
radius - Radius

setRowNumber

public void setRowNumber(int rowNumber)
Set numbers of rows

Specified by:
setRowNumber in interface TopologyModel
Parameters:
rowNumber - numbers of rows