simuLCS
Class Template

java.lang.Object
  extended bysimuLCS.Template
Direct Known Subclasses:
TemplateRSP

public abstract class Template
extends java.lang.Object

Subclass of all the Templatee: a Template defines the meaning of the bits of a classifier.

Author:
Benoit

Field Summary
protected  ClassifierComponent[] actions
           
protected  ClassifierComponent[] conditions
           
protected  java.lang.String name
           
protected  int NB_BITS_ACTION
           
protected  int NB_BITS_CONDITION
           
protected  int nbPartsAction
           
protected  int nbPartsCondition
           
 
Constructor Summary
Template()
           
 
Method Summary
 ClassifierComponent getAction(int i)
           
 ClassifierComponent[] getActions()
           
 ClassifierComponent getCondition(int i)
           
 ClassifierComponent[] getConditions()
           
abstract  int getMinNbActions()
          Specifies the minimal number of actions that must be present in a match set or else covering will occur.
 java.lang.String getName()
           
 int getNbBitsAction()
           
 int getNbBitsCondition()
           
 int getNbPartsCondition()
           
abstract  int getNbPossibleActions()
           
abstract  G_Panel getPanActions()
           
abstract  G_Panel getPanConditions()
           
abstract  Vector2D getVectorFromAction(Classifier c, Entity me, Entity otherEntity)
          Return the Vector created by the Action part of the classifier
 Vector2D getVectorFromActions(Classifier[] cs, Entity me, Entity otherEntity)
          Return the Vector created by the actions partS of several classifiers
 void setName(java.lang.String n)
           
 java.lang.String testCondition(Entity otherEntity)
          Return a string of "0","1", or "#" containing the result of all the conditions tested on the entity otherEntity
abstract  java.lang.String testCondition(int i, Entity otherEntity)
          Return a string of "0","1", or "#" containing the result of the condition i tested on the entity otherEntity
abstract  void updateValuesUI()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NB_BITS_CONDITION

protected int NB_BITS_CONDITION

NB_BITS_ACTION

protected int NB_BITS_ACTION

name

protected java.lang.String name

nbPartsCondition

protected int nbPartsCondition

nbPartsAction

protected int nbPartsAction

conditions

protected ClassifierComponent[] conditions

actions

protected ClassifierComponent[] actions
Constructor Detail

Template

public Template()
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String n)

getNbPartsCondition

public int getNbPartsCondition()

getNbPossibleActions

public abstract int getNbPossibleActions()

getMinNbActions

public abstract int getMinNbActions()
Specifies the minimal number of actions that must be present in a match set or else covering will occur.


testCondition

public abstract java.lang.String testCondition(int i,
                                               Entity otherEntity)
Return a string of "0","1", or "#" containing the result of the condition i tested on the entity otherEntity

Parameters:
i - the number of the condition tested
otherEntity - the agent we want to test the condition on

testCondition

public java.lang.String testCondition(Entity otherEntity)
Return a string of "0","1", or "#" containing the result of all the conditions tested on the entity otherEntity

Parameters:
otherEntity - the agent we want to test the condition on

getVectorFromAction

public abstract Vector2D getVectorFromAction(Classifier c,
                                             Entity me,
                                             Entity otherEntity)
Return the Vector created by the Action part of the classifier

Parameters:
c - the Classifier from which the action part will be interpreted
me - the Entity which has this classifier
otherEntity - the Entity which generates this vector as a response

getVectorFromActions

public Vector2D getVectorFromActions(Classifier[] cs,
                                     Entity me,
                                     Entity otherEntity)
Return the Vector created by the actions partS of several classifiers


getPanConditions

public abstract G_Panel getPanConditions()
Returns:

getPanActions

public abstract G_Panel getPanActions()
Returns:

updateValuesUI

public abstract void updateValuesUI()

getAction

public ClassifierComponent getAction(int i)

getConditions

public ClassifierComponent[] getConditions()

getActions

public ClassifierComponent[] getActions()

getNbBitsCondition

public int getNbBitsCondition()

getNbBitsAction

public int getNbBitsAction()

getCondition

public ClassifierComponent getCondition(int i)