Class Frequency
java.lang.Object
org.moeaframework.algorithm.extension.Frequency
Defines a frequency at which some action, operation, or even toccurs.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetType()
Returns the type of this frequency.int
getValue()
The value of this frequency.static Frequency
ofEvaluations
(int value) Constructs a frequency based on the number of evaluations.static Frequency
ofIterations
(int value) Constructs a frequency based on the number of iterations.toString()
-
Constructor Details
-
Frequency
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
Returns the type of this frequency.- Returns:
- the type of this frequency
-
toString
-
ofEvaluations
Constructs a frequency based on the number of evaluations.- Parameters:
value
- the number of evaluations, which must be> 0
- Returns:
- the frequency
-
ofIterations
Constructs a frequency based on the number of iterations.- Parameters:
value
- the number of iterations, which must be> 0
- Returns:
- the frequency
-