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.Operations
Class ReplacementOperation

    java.lang.Object
      Operator.Operations.ReplacementOperation

All Implemented Interfaces:
  Operation, ParameterI

    public class ReplacementOperation

extends java.lang.Object
implements Operation

ReplacementOperation removes replacementSize Individuals from the population

Author:
  Blip

Field Summary
`protected Fitness[]` | `fitnessA`
`protected int` | `replacementSize`

Constructor Summary
`ReplacementOperation(int size)` Creates a new instance of ReplacementOperation
`ReplacementOperation(java.util.Properties p)` Creates a new instance of ReplacementOperation

Method Summary
`void` | `doOperation(Individual operand)` Performs the operation on an operand
`void` | `doOperation(java.util.List<Individual> operand)` Sort ascending and remove the worst individuals
`void` | `doOperation(java.util.List<Individual> operand, int size)` Sort ascending and remove the size worst individuals
`int` | `getReplacementSize()` Get replacement size
`void` | `setProperties(java.util.Properties p)` Set properties
`void` | `setReplacementSize(int i)` Set replacement size

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

Field Detail

### replacementSize

    protected int replacementSize

### fitnessA

    protected Fitness[] fitnessA

Constructor Detail

### ReplacementOperation

    public ReplacementOperation(int size)

  Creates a new instance of ReplacementOperation

  Parameters:
    `size` - size

### ReplacementOperation

    public ReplacementOperation(java.util.Properties p)

  Creates a new instance of ReplacementOperation

  Parameters:
    `p` - properties

Method Detail

### setProperties

    public void setProperties(java.util.Properties p)

  Set properties

  Specified by:
    `setProperties` in interface `ParameterI`
  Parameters:
    `p` - object containing properties

### doOperation

    public void doOperation(Individual operand)

  Description copied from interface: `Operation`
  Performs the operation on an operand

  Specified by:
    `doOperation` in interface `Operation`
  Parameters:
    `operand` - operand to perform operation on

### doOperation

    public void doOperation(java.util.List<Individual> operand)

  Sort ascending and remove the worst individuals

  Specified by:
    `doOperation` in interface `Operation`
  Parameters:
    `operand` - Individuals to trim

### doOperation

    public void doOperation(java.util.List<Individual> operand,
                            int size)

  Sort ascending and remove the size worst individuals

  Parameters:
    `operand` - Individuals to trim
    `size` - Number of individuals to remove

### setReplacementSize

    public void setReplacementSize(int i)

  Set replacement size

  Parameters:
    `i` - size

### getReplacementSize

    public int getReplacementSize()

  Get replacement size

  Returns:
    size

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