de.ls5.jlearn.oracles
Class AsyncOracleImpl

java.lang.Object
  extended by de.ls5.jlearn.oracles.AsyncOracleImpl
All Implemented Interfaces:
AsyncOracle, Oracle, Serializable

public class AsyncOracleImpl
extends Object
implements AsyncOracle

Author:
merten
See Also:
Serialized Form

Constructor Summary
AsyncOracleImpl()
           
 
Method Summary
 void answerQuery(Word query, Word answer)
          Provide an answer for a query previously retrieved from this asynchronous oracle.
 List<Word> getQueries(int maxNumberOfQueries)
          Retrieve a list of queries currently buffered in this asynchronous oracle.
 Word processQuery(Word trace)
          Process an incoming sequence (word) of input symbols and return a sequence (word) of output symbols produced as reacion to the input symbols.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncOracleImpl

public AsyncOracleImpl()
Method Detail

getQueries

public List<Word> getQueries(int maxNumberOfQueries)
Description copied from interface: AsyncOracle
Retrieve a list of queries currently buffered in this asynchronous oracle.

Specified by:
getQueries in interface AsyncOracle
Parameters:
maxNumberOfQueries - the maximal number of queries to be retrieved
Returns:
a List of query Word objects

answerQuery

public void answerQuery(Word query,
                        Word answer)
Description copied from interface: AsyncOracle
Provide an answer for a query previously retrieved from this asynchronous oracle.

Specified by:
answerQuery in interface AsyncOracle
Parameters:
query - a query previously retrieved from this asynchronous oracle
answer - the result of the query

processQuery

public Word processQuery(Word trace)
                  throws LearningException
Description copied from interface: Oracle
Process an incoming sequence (word) of input symbols and return a sequence (word) of output symbols produced as reacion to the input symbols.

Specified by:
processQuery in interface Oracle
Parameters:
trace - Word object respresenting the query the system is supposed to process
Returns:
Word object with the system's response to the provide query
Throws:
LearningException


Copyright © 2011. All Rights Reserved.