Package tests.MSOM

Class SOM

All Implemented Interfaces:
Serializable, Runnable

public class SOM extends defaultWorker<SOMData,SOMData>
Workers of the MSOM containing a part of the neural network and communicating with neighbours (TOP, LEFT, BOTTOM, RIGHT) Receiving instructions from Emitter and sending results to Collector
See Also:
  • Field Details

  • Constructor Details

    • SOM

      public SOM(int w, int h, int d, int id)
    • SOM

      public SOM(int w, int h, int d, double[][][] som, int id)
  • Method Details

    • runJob

      public void runJob() throws InterruptedException
      Description copied from class: defaultJob
      blank function that should be overwritten by class extending bbflow.defaultJob. Here main computation task is done once we're sure there's data in at least one of the input channels Lists 'in' and 'out' must be used manually and EOS() must be managed by the user.
      Overrides:
      runJob in class defaultJob<SOMData,SOMData>
      Throws:
      InterruptedException
    • randomize

      void randomize()
    • normalize

      public static ArrayList<Double> normalize(ArrayList<Double> line, int depth)
    • searchBestPosition

      public bestPosition searchBestPosition(double[] d_neuron)
    • learnVector

      void learnVector(double[] neuron, int i, int j, double curve)
    • learnVector

      void learnVector(double[] neuron, int besti, int bestj)
    • train

      private void train(Integer pos1, Integer pos2, double[] neuron, double curve, int i, int j)