Class VelocityTerm

java.lang.Object
org.opt4j.optimizer.mopso.VelocityTerm
All Implemented Interfaces:
Term

public class VelocityTerm extends Object implements Term
The VelocityTerm is used to determine the new velocity of a Particle.
  • Field Details

    • term

      protected final Term term
    • random

      protected final Random random
    • W

      protected final Var W
    • C1

      protected final Var C1
    • C2

      protected final Var C2
    • r1

      protected final Var r1
    • r2

      protected final Var r2
  • Constructor Details

    • VelocityTerm

      public VelocityTerm(Rand random)
      Constructs a VelocityTerm.
      Parameters:
      random - the random number generator
  • Method Details

    • calculate

      public double calculate(double... values)
      Description copied from interface: Term
      Calculates the result of this Term.
      Specified by:
      calculate in interface Term
      Parameters:
      values - the values
      Returns:
      the result
    • randomize

      public void randomize()
      Randomizes the constants of the term.