Class Frequency

java.lang.Object
org.moeaframework.algorithm.extension.Frequency

public class Frequency extends Object
Defines a frequency at which some action, operation, or even toccurs.
  • Constructor Details

    • Frequency

      public Frequency(int value, Frequency.Type type)
      Constructs a new frequency.
      Parameters:
      value - the value of this frequency, which must be > 0
      type - the type of this frequency
  • Method Details

    • getValue

      public int getValue()
      The value of this frequency.
      Returns:
      the value of this frequency
    • getType

      public Frequency.Type getType()
      Returns the type of this frequency.
      Returns:
      the type of this frequency
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • ofEvaluations

      public static Frequency ofEvaluations(int value)
      Constructs a frequency based on the number of evaluations.
      Parameters:
      value - the number of evaluations, which must be > 0
      Returns:
      the frequency
    • ofIterations

      public static Frequency ofIterations(int value)
      Constructs a frequency based on the number of iterations.
      Parameters:
      value - the number of iterations, which must be > 0
      Returns:
      the frequency