org.encog.neural.networks.training.pso

## Class NeuralPSOWorker

- java.lang.Object
- - org.encog.neural.networks.training.pso.NeuralPSOWorker

- All Implemented Interfaces:
    EngineTask

      public class NeuralPSOWorker
      extends Object
      implements EngineTask

  PSO multi-treaded worker. It allows PSO to offload all of the individual particle calculations to a separate thread. Contributed by: Geoffroy Noel https://github.com/goffer-looney
  Author:
    Geoffroy Noel

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NeuralPSOWorker(NeuralPSO neuralPSO, int particleIndex, boolean init)` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `run()` Update the particle velocity, position and personal best.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NeuralPSOWorker

          public NeuralPSOWorker(NeuralPSO neuralPSO,
                         int particleIndex,
                         boolean init)

      Constructor.
      Parameters:
        `neuralPSO` - the training algorithm
        `particleIndex` - the index of the particle in the swarm
        `init` - true for an initialisation iteration

  - ### Method Detail

    - #### run

          public final void run()

      Update the particle velocity, position and personal best.
      Specified by:
        `run` in interface `EngineTask`

Copyright © 2014. All Rights Reserved.