jhpro.nnet.jknnl
Class MatrixTopology
- java.lang.Object
-
- jhpro.nnet.jknnl.MatrixTopology
-
- All Implemented Interfaces:
- TopologyModel
public class MatrixTopology extends java.lang.Object implements TopologyModel
Matrix Topology is a topology where neurons is set in rows and columns.
-
-
Constructor Summary
Constructors 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetColNumber()Return number of columnsjava.util.ArrayListgetConnectedNeurons(int neuronNumber)Return ArrayList of neurons connected to neuron with neuron Numberjava.util.TreeMapgetNeighbourhood(int neuronNumber)Return TreeMap containng information about neuron and distance to neuron for which neighbourhood is calculatedCoordsgetNeuronCoordinate(int neuronNumber)Return Coord object contain intormation about neuron co-ordinateintgetNeuronNumber(Coords coords)Return neuron number with specyfied co-ordianteintgetNumbersOfNeurons()Return number of neuron.intgetRadius()Return radius for calculate neighbourhoodintgetRowNumber()Return number of rowsvoidsetColNumber(int colNumber)Set number of columnsvoidsetRadius(int radius)Set radiusvoidsetRowNumber(int rowNumber)Set numbers of rowsjava.lang.StringtoString()Returns a string representation of the topology.
Neuron number nr is connected with: [ list of neurons ]
-
-
-
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 rowscol- 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 rowscol- number of columnsradius- 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:
toStringin interfaceTopologyModel- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation of the topology.
-
getColNumber
public int getColNumber()
Return number of columns- Specified by:
getColNumberin interfaceTopologyModel- Returns:
- number of columns
-
getConnectedNeurons
public java.util.ArrayList getConnectedNeurons(int neuronNumber)
Return ArrayList of neurons connected to neuron with neuron Number- Specified by:
getConnectedNeuronsin interfaceTopologyModel- 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:
getNeighbourhoodin interfaceTopologyModel- 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:
getNeuronCoordinatein interfaceTopologyModel- Parameters:
neuronNumber- neuron number- Returns:
- coords object
-
getNeuronNumber
public int getNeuronNumber(Coords coords)
Return neuron number with specyfied co-ordiante- Specified by:
getNeuronNumberin interfaceTopologyModel- Parameters:
coords- neuron coordinate- Returns:
- neuron number
-
getNumbersOfNeurons
public int getNumbersOfNeurons()
Return number of neuron.- Specified by:
getNumbersOfNeuronsin interfaceTopologyModel- Returns:
- number of neurons
-
getRadius
public int getRadius()
Return radius for calculate neighbourhood- Specified by:
getRadiusin interfaceTopologyModel- Returns:
- radius
-
getRowNumber
public int getRowNumber()
Return number of rows- Specified by:
getRowNumberin interfaceTopologyModel- Returns:
- numbers of rows
-
setColNumber
public void setColNumber(int colNumber)
Set number of columns- Specified by:
setColNumberin interfaceTopologyModel- Parameters:
colNumber- numbers of columns
-
setRadius
public void setRadius(int radius)
Set radius- Specified by:
setRadiusin interfaceTopologyModel- Parameters:
radius- Radius
-
setRowNumber
public void setRowNumber(int rowNumber)
Set numbers of rows- Specified by:
setRowNumberin interfaceTopologyModel- Parameters:
rowNumber- numbers of rows
-
-
DMelt 3.0 © DataMelt by jWork.ORG