Documentation of 'jhpro.nnet.jknnl.HexagonalTopology' Java class
HexagonalTopology
jhpro.nnet.jknnl

Class HexagonalTopology

  • All Implemented Interfaces:
    TopologyModel


    public class HexagonalTopology
    extends java.lang.Object
    implements TopologyModel
    HexagonalTopology is a topology where neurons are placed in hexagonal net. Even rows are shifted on place to right.
    • Constructor Summary

      Constructors 
      Constructor and Description
      HexagonalTopology(int row, int col)
      Creates a new instance of HexagonalTopology with specified numbers of rows and columns.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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 contains information about neuron co-ordinate in Hexagonal Topology
      int getNeuronNumber(Coords coords)
      Return neuron number of specyfied co-ordiante
      int getNumbersOfNeurons()
      Return number of neurons in topology.
      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 number of rows
      java.lang.String toString()
      Returns a string representation of the topology.
      Neuron number nr is connected with: [ list of neurons ]
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HexagonalTopology

        public HexagonalTopology(int row,
                                 int col)
        Creates a new instance of HexagonalTopology with specified numbers of rows and columns. Radius is default set to 0
        Parameters:
        row - number of rows
        col - number of columns
    • Method Detail

      • setRowNumber

        public void setRowNumber(int rowNumber)
        Set number of rows
        Specified by:
        setRowNumber in interface TopologyModel
        Parameters:
        rowNumber - numbers of rows
      • setColNumber

        public void setColNumber(int colNumber)
        Set number of columns
        Specified by:
        setColNumber in interface TopologyModel
        Parameters:
        colNumber - numbers of columns
      • getRowNumber

        public int getRowNumber()
        Return number of rows
        Specified by:
        getRowNumber in interface TopologyModel
        Returns:
        numbers of rows
      • getColNumber

        public int getColNumber()
        Return number of columns
        Specified by:
        getColNumber in interface TopologyModel
        Returns:
        number of columns
      • setRadius

        public void setRadius(int radius)
        Set radius
        Specified by:
        setRadius in interface TopologyModel
        Parameters:
        radius - Radius
      • getRadius

        public int getRadius()
        Return radius for calculate neighbourhood
        Specified by:
        getRadius in interface TopologyModel
        Returns:
        radius
      • 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
      • getNumbersOfNeurons

        public int getNumbersOfNeurons()
        Return number of neurons in topology.
        Specified by:
        getNumbersOfNeurons in interface TopologyModel
        Returns:
        number of neurons
      • getNeighbourhood

        public java.util.TreeMap getNeighbourhood(int neuronNumber)
        Return TreeMap containing 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
      • getNeuronNumber

        public int getNeuronNumber(Coords coords)
        Return neuron number of specyfied co-ordiante
        Specified by:
        getNeuronNumber in interface TopologyModel
        Parameters:
        coords - neuron coordinate
        Returns:
        neuron number
      • getNeuronCoordinate

        public Coords getNeuronCoordinate(int neuronNumber)
        Return Coord object contains information about neuron co-ordinate in Hexagonal Topology
        Specified by:
        getNeuronCoordinate in interface TopologyModel
        Parameters:
        neuronNumber - neuron number
        Returns:
        coords object
      • 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.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.