org.eyelanguage.rl.reading
Class ReadingStateParallelRelative

java.lang.Object
  extended by net.pakl.rl.State
      extended by org.eyelanguage.rl.reading.ReadingState
          extended by org.eyelanguage.rl.reading.ReadingStateRelative
              extended by org.eyelanguage.rl.reading.ReadingStateParallelRelative
All Implemented Interfaces:
java.io.Serializable, HasVectorRepresentation, SubdivisionIdentification

public class ReadingStateParallelRelative
extends ReadingStateRelative
implements SubdivisionIdentification

In parallel states, we have to keep track of which words of the sentence have been identified already but for default compatability with earlier states we return information about the first word in the window for length, ID and whether the word is identified. Also we need to know how much time has been spent attending to (identifying) each word.

See Also:
Serialized Form

Field Summary
 boolean[] attWindowIdentified
           
 int[] attWindowLengths
           
 double[] attWindowPredictabilities
           
 int[] attWindowTimes
           
 int[] attWindowWordIDs
           
static boolean FORCE_ROUNDING_TO_GRANULARITY
           
 
Fields inherited from class org.eyelanguage.rl.reading.ReadingState
attendedWordID, attendedWordLen, attendedWordPredictability, distanceFromAttendCenter, eyePosition, fixatedWordID, identified, nextWordLen, previousWordLen, programmingSaccade, saccadeRequestDistance, timeAttending, timeInProgrammingSaccade
 
Constructor Summary
ReadingStateParallelRelative()
           
ReadingStateParallelRelative(ReadingStateParallelRelative s)
           
 
Method Summary
 void copyFrom(ReadingState s)
           
 boolean equals(java.lang.Object otherObject)
           
 ReadingStateParallelRelative fromString(java.lang.String s)
           
 int getAttendedWordID()
           
 int getAttendedWordLen()
           
 int getBeginningOfAttWindow()
           
 int getCenterOfAttentionID()
           
 int getNumIdentified()
           
 int getParallelTimeAttended(int i)
           
 java.lang.String getPatchName()
          Returns the name of the patch in which the agent should look for the value of this state.
 int getSumAttWindowTimes()
           
 int getTimeAttending()
           
 int hashCode()
          Any two objects which are equal must have equal HashCodes, but not necessarily the other way around.
 void incParallelTimeAttended(int i, int delta)
           
 boolean isIdentified()
           
 boolean isIdentifiedInWindow(int index)
           
 boolean leftMostAttendedWordIsIdentified()
           
static double roundTo(double value, double roundToNearest)
           
static int roundTo(int value, int roundToNearest)
           
 void roundToLinearAttentionGradient()
           
 void setAttendedWordID()
           
 void setParallelTimeAttended(int i, int value)
           
 void setTimeAttending(int timeAttending)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eyelanguage.rl.reading.ReadingStateRelative
binaryRepresentation, binaryRepresentationIndices, boolValue, doubleRepresentation, doubleValue, intValue, main, parseString, test
 
Methods inherited from class org.eyelanguage.rl.reading.ReadingState
clear, getAttendedWordPredictability, getDistanceFromAttendCenter, getEyePosition, getFixatedWordID, getNextNextWordLen, getNextNextWordPredictability, getNextWordLen, getNextWordPredictability, getPreviousWordLen, getPreviousWordPredictability, getSaccadeRequestDistance, getTimeInProgrammingSaccade, isProgrammingSaccade, setAttendedWordID, setAttendedWordLen, setAttendedWordPredictability, setDistanceFromAttendCenter, setEyePosition, setFixatedWordID, setIdentified, setNextNextWordLen, setNextNextWordPredictability, setNextWordLen, setNextWordPredictability, setPreviousWordLen, setPreviousWordPredictability, setProgrammingSaccade, setSaccadeRequestDistance, setTimeInProgrammingSaccade, uniqueCode
 
Methods inherited from class net.pakl.rl.State
concatenateArrays, representAsVector
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FORCE_ROUNDING_TO_GRANULARITY

public static final boolean FORCE_ROUNDING_TO_GRANULARITY
See Also:
Constant Field Values

attWindowIdentified

public boolean[] attWindowIdentified

attWindowWordIDs

public int[] attWindowWordIDs

attWindowTimes

public int[] attWindowTimes

attWindowPredictabilities

public double[] attWindowPredictabilities

attWindowLengths

public int[] attWindowLengths
Constructor Detail

ReadingStateParallelRelative

public ReadingStateParallelRelative()

ReadingStateParallelRelative

public ReadingStateParallelRelative(ReadingStateParallelRelative s)
Method Detail

leftMostAttendedWordIsIdentified

public boolean leftMostAttendedWordIsIdentified()

getCenterOfAttentionID

public int getCenterOfAttentionID()

isIdentifiedInWindow

public boolean isIdentifiedInWindow(int index)

getTimeAttending

public int getTimeAttending()
Overrides:
getTimeAttending in class ReadingState

setTimeAttending

public void setTimeAttending(int timeAttending)
Overrides:
setTimeAttending in class ReadingState

setParallelTimeAttended

public void setParallelTimeAttended(int i,
                                    int value)

incParallelTimeAttended

public void incParallelTimeAttended(int i,
                                    int delta)

getParallelTimeAttended

public int getParallelTimeAttended(int i)

setAttendedWordID

public void setAttendedWordID()

getAttendedWordID

public int getAttendedWordID()
Overrides:
getAttendedWordID in class ReadingState

getBeginningOfAttWindow

public int getBeginningOfAttWindow()

getSumAttWindowTimes

public int getSumAttWindowTimes()

getNumIdentified

public int getNumIdentified()

isIdentified

public boolean isIdentified()
Overrides:
isIdentified in class ReadingState

copyFrom

public void copyFrom(ReadingState s)
Overrides:
copyFrom in class ReadingState

getAttendedWordLen

public int getAttendedWordLen()
Overrides:
getAttendedWordLen in class ReadingState

equals

public boolean equals(java.lang.Object otherObject)
Overrides:
equals in class ReadingStateRelative

roundTo

public static int roundTo(int value,
                          int roundToNearest)

roundTo

public static double roundTo(double value,
                             double roundToNearest)

roundToLinearAttentionGradient

public void roundToLinearAttentionGradient()

hashCode

public int hashCode()
Any two objects which are equal must have equal HashCodes, but not necessarily the other way around.

Overrides:
hashCode in class ReadingStateRelative

fromString

public ReadingStateParallelRelative fromString(java.lang.String s)

toString

public java.lang.String toString()
Overrides:
toString in class ReadingStateRelative

getPatchName

public java.lang.String getPatchName()
Description copied from interface: SubdivisionIdentification
Returns the name of the patch in which the agent should look for the value of this state.

Specified by:
getPatchName in interface SubdivisionIdentification
Overrides:
getPatchName in class ReadingStateRelative