librarian
Class ppProcessor

java.lang.Object
  |
  +--librarian.ppProcessor

public class ppProcessor
extends java.lang.Object

The class collects several tools used when pre- or postprocessing a LEA move. It contains information about:


Field Summary
 int currentTestDataLine
           
 interagents.EuLab objectTrace
           
static int PIDGIN_MINUS_MAX
          The number of allowed minuses in a pidgin object reference
 
Constructor Summary
ppProcessor()
          Readies the ppProcessor for use, miscellaneous initialization
 
Method Summary
 void addLabel(interagents.wrapItemBlock wib, java.lang.String label)
           
 void chooseTestDataLine(int line)
          Chooses a line of test data, checking if existant if line>0
 void clearObjectTrace()
           
 void clearTestDataBase()
           
 void designReadTestData(fundamentals.EuArguments args)
           
 java.util.Random getCroupier()
           
 librarian.EuLibrarian getLibrarian()
           
 interagents.EuLab getObjectTrace()
           
 fundamentals.EuArguments getTestDataLine()
           
 double getTestDatum(int n)
           
 int historyLookup(int typeIndex, int back)
          Looks up the EuLab index of a previous output of type typeIndex.
 interagents.wrapItemBlock labelLookup(java.lang.String label)
           
 void readTestData(fundamentals.EuArguments args)
          Read arguments from a TestDatum command into the test database.
 void setCroupier(java.util.Random croupier)
           
 void setLibrarian(librarian.EuLibrarian librarian)
           
 void updateHistory(interagents.finalWrapper out)
          Update history with the data in the supplied wrapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentTestDataLine

public int currentTestDataLine

objectTrace

public interagents.EuLab objectTrace

PIDGIN_MINUS_MAX

public static final int PIDGIN_MINUS_MAX
The number of allowed minuses in a pidgin object reference

See Also:
Constant Field Values
Constructor Detail

ppProcessor

public ppProcessor()
Readies the ppProcessor for use, miscellaneous initialization

Method Detail

historyLookup

public int historyLookup(int typeIndex,
                         int back)
                  throws InternalException,
                         DesignException
Looks up the EuLab index of a previous output of type typeIndex. The number back determines how much back in time to go, progressing 0 (previous), 1 (penultimate), etc, up to PIDGIN_MINUS_MAX.

Parameters:
typeIndex - index of object type
back - how much back in time to go
Returns:
the index
Throws:
InternalException - if back too small or large
DesignException - if no such history available

labelLookup

public interagents.wrapItemBlock labelLookup(java.lang.String label)

addLabel

public void addLabel(interagents.wrapItemBlock wib,
                     java.lang.String label)

updateHistory

public void updateHistory(interagents.finalWrapper out)
Update history with the data in the supplied wrapper

Parameters:
out - recent output with which to update

chooseTestDataLine

public void chooseTestDataLine(int line)
                        throws DesignException
Chooses a line of test data, checking if existant if line>0

Parameters:
line - indexed from 0 and up
Throws:
DesignException - if no such line

getTestDataLine

public fundamentals.EuArguments getTestDataLine()
                                         throws DesignException
DesignException

getTestDatum

public double getTestDatum(int n)
                    throws DesignException
Parameters:
n - the number of the datum, indexed from 0 and up
Returns:
a test datum from current line of test data
Throws:
DesignException - if no such datum

readTestData

public void readTestData(fundamentals.EuArguments args)
                  throws DesignException,
                         InternalException
Read arguments from a TestDatum command into the test database.

Parameters:
args - arguments to pass
Throws:
DesignException - if argument lenghts are varying
InternalException

clearTestDataBase

public void clearTestDataBase()

designReadTestData

public void designReadTestData(fundamentals.EuArguments args)
                        throws DesignException,
                               InternalException
DesignException
InternalException

setLibrarian

public void setLibrarian(librarian.EuLibrarian librarian)

getLibrarian

public librarian.EuLibrarian getLibrarian()

setCroupier

public void setCroupier(java.util.Random croupier)

getCroupier

public java.util.Random getCroupier()

getObjectTrace

public interagents.EuLab getObjectTrace()

clearObjectTrace

public void clearObjectTrace()