Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.common
Class AbstractRouter

java.lang.Object
  extended byorg.evolvica.engine.AbstractOperator
      extended byorg.evolvica.core.common.AbstractGeneticOperator
          extended byorg.evolvica.core.common.AbstractRouter
All Implemented Interfaces:
IFork, IGeneticOperator, IOperator, java.io.Serializable
Direct Known Subclasses:
ConditionalRouter

public abstract class AbstractRouter
extends AbstractGeneticOperator
implements IFork

Abstract base class for a router. A router receives data on its input and sends the input data further to one of its outputs, dependent on its internal state, some external condition(s) or something similiar.

Since:
0.4.0
Version:
$Revision: 1.10 $ $Date: 2004/05/26 11:57:57 $
Author:
Andreas Rummler
See Also:
Serialized Form

Field Summary
protected  java.lang.Object[] output
          Output objects.
 
Fields inherited from class org.evolvica.engine.AbstractOperator
descriptor, element, id, name
 
Constructor Summary
AbstractRouter()
          Constructor.
 
Method Summary
 java.lang.Object[] fork(java.lang.Object input)
          Performs the fork operation on the input data and returns an array of data objects as output.
abstract  int route(IIndividualSet input)
          Calculates the output to which the individual set should be routed.
 
Methods inherited from class org.evolvica.engine.AbstractOperator
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.evolvica.engine.IOperator
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName
 

Field Detail

output

protected java.lang.Object[] output
Output objects.

Constructor Detail

AbstractRouter

public AbstractRouter()
Constructor.

Method Detail

fork

public java.lang.Object[] fork(java.lang.Object input)
Description copied from interface: IFork
Performs the fork operation on the input data and returns an array of data objects as output. Note that slots in the output array MAY be null.

Specified by:
fork in interface IFork
Parameters:
input - input data
Returns:
array of output data
See Also:
IFork.fork(java.lang.Object)

route

public abstract int route(IIndividualSet input)
Calculates the output to which the individual set should be routed.

Parameters:
input - the individual set that should be routed
Returns:
the number of the output to which the individual set should is sent

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems