art.cs
Class Message

java.lang.Object
  extended byart.ga.Chromosome
      extended byart.cs.Message
All Implemented Interfaces:
GaSolution

public class Message
extends Chromosome

The message is the information coming from the environment to be evaluated. It is a chromosome with only one genome (0) defined "text".

Author:
Marco Lamieri and Gianluigi Ferraris

Constructor Summary
Message(CsConfiguration configuration, Population population, Author owner, Gene[] text)
          Constructor of the class using a genome array as body.
Message(CsConfiguration configuration, Population population, Author owner, int[] textInt)
          Constructor of the class using a integer array as body.
 
Method Summary
 Author getOwner()
          Get the author of the message.
 double getSupport()
          Support is similar to fitness for message.
 Gene[] getText()
          Get the body (text) of the message.
 void setSupport(double support)
          Support is similar to fitness for message.
 
Methods inherited from class art.ga.Chromosome
getAge, getBody, getChild, getFitness, getGenome, getMyPopulation, getNumberOfRules, getRescaledFitness, getRule, getSelectedForDie, getSelectedForReproduction, initializeChromosome, isFitnessEvaluated, print, print, setAge, setBody, setChild, setFitness, setFitnessEvaluated, setRescaledFitness, setRescaledFitnessEvaluated, setSelectedForDie, setSelectedForReproduction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message(CsConfiguration configuration,
               Population population,
               Author owner,
               Gene[] text)
Constructor of the class using a genome array as body.

Parameters:
configuration - Configuration
population - Population
owner - Owner
text - Body

Message

public Message(CsConfiguration configuration,
               Population population,
               Author owner,
               int[] textInt)
Constructor of the class using a integer array as body.

Parameters:
configuration - Configuration
population - Population
owner - Owner
textInt - Body
Method Detail

getText

public Gene[] getText()
Get the body (text) of the message.

Returns:
Text

getOwner

public Author getOwner()
Get the author of the message.

Returns:
Returns the owner.

getSupport

public double getSupport()
Support is similar to fitness for message.

Returns:
Returns the support.

setSupport

public void setSupport(double support)
Support is similar to fitness for message.

Parameters:
support - The support to set.