Interface Collector

All Known Implementing Classes:
AdaptiveMultimethodVariationCollector, AdaptiveTimeContinuationCollector, ApproximationSetCollector, ElapsedTimeCollector, EpsilonProgressCollector, IndicatorCollector, PopulationCollector, PopulationSizeCollector, PSOCollector

public interface Collector
Collects information from an object. In general, the object will be an algorithm or an object stored within an algorithm. Collectors have two states: attached and unattached. Collectors are initially unattached, and are attached to an appropriate object, called the attach point, by invoking attach(Object). Once attached, the collect(Observation) may be invoked.
  • Method Summary

    Modifier and Type
    Method
    Description
    attach(Object object)
    Returns a new instance of this collector which has been attached to the specified object as identified by the attach point returned through getAttachPoint().
    void
    collect(Observation observation)
    Collects the requested information from the object, storing the data to the specified observation.
    Returns the attach point describing where this collector is attached.
  • Method Details

    • getAttachPoint

      AttachPoint getAttachPoint()
      Returns the attach point describing where this collector is attached. The matched object should be unique.
      Returns:
      the attach point describing where this collector is attached
    • attach

      Collector attach(Object object)
      Returns a new instance of this collector which has been attached to the specified object as identified by the attach point returned through getAttachPoint().
      Parameters:
      object - the matching object
      Returns:
      a new instance of this collector which has been attached to the specified object
    • collect

      void collect(Observation observation)
      Collects the requested information from the object, storing the data to the specified observation. This method must only be invoked after this collector has been attached to an appropriate object.
      Parameters:
      observation - the observation to which the collected data is stored