Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Operator
Class Collector

    java.lang.Object
      Operator.Collector

All Implemented Interfaces:
  Module, Operator

    public class Collector

extends java.lang.Object
implements Operator

Collector is used as a base class for collecting data from a population, e.g for collecting statistics. This class should not be used to derive a class that alters a population.

Author:
  erikhemberg

Constructor Summary
`Collector(Operation op)` Creates a new instance of Collector

Method Summary
`IndividualCatcher` | `getBest()` Call the getBest(list operands) in the operation.
`Operation` | `getOperation()` Get operation that operator performs
`void` | `perform()` Performs the operation on the population
`void` | `print(boolean toFile)` Call the print(list operands, boolean b) in the operation.
`void` | `setOperation(Operation op)` Set operation that operator performs
`void` | `setPopulation(Population p)` Set the population on which the module will perform its operations

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Collector

    public Collector(Operation op)

  Creates a new instance of Collector

  Parameters:
    `op` - operation

Method Detail

### getOperation

    public Operation getOperation()

  Description copied from interface: `Operator`
  Get operation that operator performs

  Specified by:
    `getOperation` in interface `Operator`
  Returns:
    operation

### setOperation

    public void setOperation(Operation op)

  Description copied from interface: `Operator`
  Set operation that operator performs

  Specified by:
    `setOperation` in interface `Operator`
  Parameters:
    `op` - operation

### setPopulation

    public void setPopulation(Population p)

  Description copied from interface: `Module`
  Set the population on which the module will perform its operations

  Specified by:
    `setPopulation` in interface `Module`
  Parameters:
    `p` - population

### perform

    public void perform()

  Description copied from interface: `Module`
  Performs the operation on the population

  Specified by:
    `perform` in interface `Module`

### print

    public void print(boolean toFile)

  Call the print(list operands, boolean b) in the operation.

  Parameters:
    `toFile` - if output is written to file

### getBest

    public IndividualCatcher getBest()

  Call the getBest(list operands) in the operation.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD