Class VelocityTerm

  • All Implemented Interfaces:
    org.opt4j.operators.algebra.Term

    public class VelocityTerm
    extends java.lang.Object
    implements org.opt4j.operators.algebra.Term
    The VelocityTerm is used to determine the new velocity of a Particle.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.opt4j.operators.algebra.Var C1  
      protected org.opt4j.operators.algebra.Var C2  
      protected org.opt4j.operators.algebra.Var r1  
      protected org.opt4j.operators.algebra.Var r2  
      protected java.util.Random random  
      protected org.opt4j.operators.algebra.Term term  
      protected org.opt4j.operators.algebra.Var W  
    • Constructor Summary

      Constructors 
      Constructor Description
      VelocityTerm​(org.opt4j.core.common.random.Rand random)
      Constructs a VelocityTerm.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double calculate​(double... values)  
      void randomize()
      Randomizes the constants of the term.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • term

        protected final org.opt4j.operators.algebra.Term term
      • random

        protected final java.util.Random random
      • W

        protected final org.opt4j.operators.algebra.Var W
      • C1

        protected final org.opt4j.operators.algebra.Var C1
      • C2

        protected final org.opt4j.operators.algebra.Var C2
      • r1

        protected final org.opt4j.operators.algebra.Var r1
      • r2

        protected final org.opt4j.operators.algebra.Var r2
    • Constructor Detail

      • VelocityTerm

        public VelocityTerm​(org.opt4j.core.common.random.Rand random)
        Constructs a VelocityTerm.
        Parameters:
        random - the random number generator
    • Method Detail

      • calculate

        public double calculate​(double... values)
        Specified by:
        calculate in interface org.opt4j.operators.algebra.Term
      • randomize

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