Classifier
Class YACSAnticipation

java.lang.Object
  |
  +--Classifier.Message
        |
        +--Classifier.Perception
              |
              +--Classifier.YACSAnticipation
All Implemented Interfaces:
Anticipation, java.lang.Comparable

public final class YACSAnticipation
extends Perception
implements Anticipation

This class is used to represent the anticipation part of a YACS classifier. Unfortunately, you cannot run YACS with this version of the software, some of the implementation job remains to be done.

Author:
Olivier Sigaud and Pierre Gérard.

Field Summary
 
Fields inherited from class Classifier.Perception
isSpecializationUpdated, length, nbSpecValues, specialization, tokenArray
 
Constructor Summary
YACSAnticipation(java.lang.String form)
           
YACSAnticipation(java.lang.String form, boolean val)
          Creation of a random anticipation
YACSAnticipation(java.lang.String strInit, java.lang.String form)
           
YACSAnticipation(Classifier.YACSAnticipation perception)
           
 
Method Summary
 byte getIndexOfFirstSpecializedToken()
           
 boolean isCompatibleWith(Classifier.Anticipation message)
           
 boolean isSpecialized(byte i)
           
 boolean matches(Classifier.Message message)
           
 
Methods inherited from class Classifier.Perception
compareTo, computeNbTokens, computeNbTokens, correctSoAsToMatch, diffWith, equals, equals, generalize, getForm, getIndexOfFirstDontCareToken, getIndexOfFirstDontKnowToken, getLength, getNbSpecValues, getNbSpecValues, getSpecialization, getToken, isDontCare, isDontChange, isDontKnow, isEqualOrLessGeneralThan, isEqualOrLessGeneralThan, isEqualOrMoreGeneralThan, isEqualOrMoreGeneralThan, isGeneral, isLessGeneralThan, isLessGeneralThan, isMoreGeneralThan, isMoreGeneralThan, isSpecialized, matches, passThrough, readNbValues, setNbSpecValues, setSpecializedToken, setToken, setValue, setValue, toString, toStringShort
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

YACSAnticipation

public YACSAnticipation(Classifier.YACSAnticipation perception)
Parameters:
perception -

YACSAnticipation

public YACSAnticipation(java.lang.String strInit,
                        java.lang.String form)
Parameters:
strInit -
form -

YACSAnticipation

public YACSAnticipation(java.lang.String form,
                        boolean val)
Creation of a random anticipation

Parameters:
form -
val -

YACSAnticipation

public YACSAnticipation(java.lang.String form)
Parameters:
form -
Method Detail

getIndexOfFirstSpecializedToken

public final byte getIndexOfFirstSpecializedToken()
Specified by:
getIndexOfFirstSpecializedToken in interface Anticipation
Overrides:
getIndexOfFirstSpecializedToken in class Perception
Returns:
byte

isSpecialized

public final boolean isSpecialized(byte i)
Specified by:
isSpecialized in interface Anticipation
Overrides:
isSpecialized in class Perception
Parameters:
i -
Returns:
boolean

matches

public final boolean matches(Classifier.Message message)
Specified by:
matches in interface Anticipation
Overrides:
matches in class Message
Parameters:
message -
Returns:
boolean

isCompatibleWith

public final boolean isCompatibleWith(Classifier.Anticipation message)
Specified by:
isCompatibleWith in interface Anticipation
Parameters:
message -
Returns:
boolean