public class MatrixTopology extends java.lang.Object implements TopologyModel
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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 containing information about neuron and distance to neuron for which neighbourhood is
calculated
|
Coords |
getNeuronCoordinate(int neuronNumber)
Return Coord object contain information about neuron co-ordinate
|
int |
getNeuronNumber(Coords coords)
Return neuron number with specified 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.
Neuron number nr is connected with: [ list of neurons ] |
public MatrixTopology(int row, int col)
row
- number of rowscol
- number of columnspublic MatrixTopology(int row, int col, int radius)
row
- number of rowscol
- number of columnsradius
- radiuspublic java.lang.String toString()
toString
in interface TopologyModel
toString
in class java.lang.Object
public int getColNumber()
getColNumber
in interface TopologyModel
public java.util.ArrayList getConnectedNeurons(int neuronNumber)
getConnectedNeurons
in interface TopologyModel
neuronNumber
- neuron numberArrayList
public java.util.TreeMap getNeighbourhood(int neuronNumber)
getNeighbourhood
in interface TopologyModel
neuronNumber
- neuron numberTreeMap
public Coords getNeuronCoordinate(int neuronNumber)
getNeuronCoordinate
in interface TopologyModel
neuronNumber
- neuron numberpublic int getNeuronNumber(Coords coords)
getNeuronNumber
in interface TopologyModel
coords
- neuron coordinatepublic int getNumbersOfNeurons()
getNumbersOfNeurons
in interface TopologyModel
public int getRadius()
getRadius
in interface TopologyModel
public int getRowNumber()
getRowNumber
in interface TopologyModel
public void setColNumber(int colNumber)
setColNumber
in interface TopologyModel
colNumber
- numbers of columnspublic void setRadius(int radius)
setRadius
in interface TopologyModel
radius
- Radiuspublic void setRowNumber(int rowNumber)
setRowNumber
in interface TopologyModel
rowNumber
- numbers of rows