Class AdaptiveMultimethodVariationCollector

java.lang.Object
org.moeaframework.analysis.runtime.AdaptiveMultimethodVariationCollector
All Implemented Interfaces:
Collector

public class AdaptiveMultimethodVariationCollector extends Object implements Collector
Collects the individual operator probabilities from AdaptiveMultimethodVariation.
  • Constructor Details

    • AdaptiveMultimethodVariationCollector

      public AdaptiveMultimethodVariationCollector()
      Constructs an unattached collector for recording the individual operator probabilities from AdaptiveMultimethodVariation.
    • AdaptiveMultimethodVariationCollector

      public AdaptiveMultimethodVariationCollector(AdaptiveMultimethodVariation variation)
      Constructs a collector for recording the individual operator probabilities from the specified AdaptiveMultimethodVariation.
      Parameters:
      variation - the AdaptiveMultimethodVariation instance this collector records data from
  • Method Details

    • collect

      public void collect(ResultEntry result)
      Description copied from interface: Collector
      Collects the requested information from the object, storing the data to the given result. This method must only be invoked after this collector has been attached to an appropriate object.
      Specified by:
      collect in interface Collector
      Parameters:
      result - the result for storing the collected data
    • getAttachPoint

      public AttachPoint getAttachPoint()
      Description copied from interface: Collector
      Returns the attach point describing where this collector is attached. The matched object should be unique.
      Specified by:
      getAttachPoint in interface Collector
      Returns:
      the attach point describing where this collector is attached
    • attach

      public Collector attach(Object object)
      Description copied from interface: Collector
      Returns a new instance of this collector which has been attached to the specified object as identified by the attach point returned through Collector.getAttachPoint().
      Specified by:
      attach in interface Collector
      Parameters:
      object - the matching object
      Returns:
      a new instance of this collector which has been attached to the specified object
    • getOperatorProbability

      public static double getOperatorProbability(ResultEntry result, String name)
      Reads the operator probability from the result.
      Parameters:
      result - the result
      name - the name of the operator
      Returns:
      the operator probability
    • getOperatorProbability

      public static double getOperatorProbability(ResultEntry result, Variation operator)
      Reads the operator probability from the result.
      Parameters:
      result - the result
      operator - the operator
      Returns:
      the operator probability