eaLib API Docs
Last Modified : January 7 2002

mss.ea.al
Class DistributingSplitter

java.lang.Object
  |
  +--mss.ea.core.GeneticOperator
        |
        +--mss.ea.al.DistributingSplitter
All Implemented Interfaces:
IndividualSplitter

public class DistributingSplitter
extends GeneticOperator
implements IndividualSplitter

Individual splitter for distributing a stream into several new streams.

Since:
0.2.1
Version:
$Revision: 1.2 $ $Date: 2001/11/20 12:26:46 $
Author:
Andreas Rummler

Field Summary
protected  int size
          Number of streams to split the incoming stream into.
 
Fields inherited from class mss.ea.core.GeneticOperator
description, ID, name
 
Constructor Summary
DistributingSplitter(int splitSize)
          Constructor.
 
Method Summary
 int getSplitSize()
          Gets the number of streams.
 IndividualStream[] split(IndividualStream is)
          Splits up the given stream.
 
Methods inherited from class mss.ea.core.GeneticOperator
getDescription, getID, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

size

protected int size
Number of streams to split the incoming stream into.
Constructor Detail

DistributingSplitter

public DistributingSplitter(int splitSize)
Constructor.
Parameters:
splitSize - number of streams to split the incoming stream into.
Method Detail

getSplitSize

public int getSplitSize()
Gets the number of streams.
Returns:
number of streams to split the incoming stream into

split

public IndividualStream[] split(IndividualStream is)
Splits up the given stream. This mehtods splits up the stream by distributing the individuals over the output streams. Example : with having the split size set to 3, individual 0 goes to stream 0, individual 1 goes to stream 1, individual 2 goes to stream 2, individual 3 again to stream 0 and so on until the incoming stream is empty.
Specified by:
split in interface IndividualSplitter
Parameters:
is - stream to be splitted up
Returns:
array with new streams

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS