Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.eval
Class CompoundScore

java.lang.Object
  extended byorg.evolvica.core.eval.CompoundScore
All Implemented Interfaces:
IMultiScore, IScore, java.io.Serializable

public class CompoundScore
extends java.lang.Object
implements IMultiScore

Default implementation for a multi score. A compound score consists of several other scores and can be used in multi-objective algorithms.

Since:
0.4.0
Version:
$Revision: 1.8 $ $Date: 2004/05/26 11:58:00 $
Author:
Andreas Rummler
See Also:
Serialized Form

Field Summary
protected  IScore[] scores
          Array of scores.
 
Constructor Summary
CompoundScore()
          Constructor.
CompoundScore(int size)
          Constructor.
CompoundScore(IScore[] scores)
          Constructor with an array of scores.
 
Method Summary
 IScore getScore(int index)
          Gets a single score from the multi score set.
 IScore[] getScores()
          Returns the array of scores that this multi score consists of.
 java.lang.Object getValueAsObject()
          (Kein Javadoc)
 int scoreSize()
          Returns the number of scores this multi score consists of.
 void setScore(IScore score, int index)
          Sets a new score at the given index.
 void setScores(IScore[] scores)
          Sets the scores of this multiscore.
 java.lang.String toString()
          Returns a string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

scores

protected IScore[] scores
Array of scores.

Constructor Detail

CompoundScore

public CompoundScore()
Constructor. This creates a compound score with an array size of 0.


CompoundScore

public CompoundScore(int size)
Constructor.

Parameters:
size - number of scores

CompoundScore

public CompoundScore(IScore[] scores)
Constructor with an array of scores.

Parameters:
scores - array of scores
Method Detail

getScore

public IScore getScore(int index)
Description copied from interface: IMultiScore
Gets a single score from the multi score set.

Specified by:
getScore in interface IMultiScore
Parameters:
index - index of the score
Returns:
score at the given index
See Also:
IMultiScore.getScore(int)

getScores

public IScore[] getScores()
Description copied from interface: IMultiScore
Returns the array of scores that this multi score consists of.

Specified by:
getScores in interface IMultiScore
Returns:
array of scores
See Also:
IMultiScore.getScores()

setScore

public void setScore(IScore score,
                     int index)
Description copied from interface: IMultiScore
Sets a new score at the given index.

Specified by:
setScore in interface IMultiScore
Parameters:
score - score to set
index - index
See Also:
IMultiScore.setScore(org.evolvica.core.IScore, int)

getValueAsObject

public java.lang.Object getValueAsObject()
(Kein Javadoc)

Specified by:
getValueAsObject in interface IScore
Returns:
score value as an object
See Also:
IScore.getValueAsObject()

scoreSize

public int scoreSize()
Description copied from interface: IMultiScore
Returns the number of scores this multi score consists of.

Specified by:
scoreSize in interface IMultiScore
Returns:
number of single scores this score contains
See Also:
IMultiScore.scoreSize()

toString

public java.lang.String toString()
Returns a string representation.

Returns:
string representation of this score in the form {1,2,...}

setScores

public void setScores(IScore[] scores)
Description copied from interface: IMultiScore
Sets the scores of this multiscore.

Specified by:
setScores in interface IMultiScore
Parameters:
scores - array of scores
See Also:
IMultiScore.setScores(org.evolvica.core.IScore[])

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

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