de.ls5.jlearn.batchoracles
Class LengthSortBatchOracle
java.lang.Object
de.ls5.jlearn.batchoracles.AbstractBatchOracle
de.ls5.jlearn.batchoracles.LengthSortBatchOracle
- All Implemented Interfaces:
- BatchOracle, Oracle, Serializable
public class LengthSortBatchOracle
- extends AbstractBatchOracle
A BatchOracle that sorts queries according to length into descending order.
This means that, e.g., all queries being prefixes of other queries will
be asked after the queries they are prefixes of. This increases the chance
of a cache hit.
- Author:
- merten
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
LengthSortBatchOracle
public LengthSortBatchOracle()
LengthSortBatchOracle
public LengthSortBatchOracle(Oracle oracle)
processQueries
public Map<Word,Word> processQueries(List<Word> queries)
throws LearningException
- Description copied from interface:
BatchOracle
- Process an incoming collection of words of input symbols and return a
map from queries to output words produced as reacion to the inputs
- Parameters:
queries
- list of Word
objects respresenting the query the system is supposed to process
- Returns:
- Map holding the results for each query
- Throws:
LearningException
setOracle
public void setOracle(Oracle oracle)
Copyright © 2011. All Rights Reserved.