net.obsearch.index.utils
Class AbstractNewLineCommandLine<O extends OB,I extends Index<O>,A extends Ambient<O,I>>
java.lang.Object
net.obsearch.index.utils.AbstractCommandLine<O,I,A>
net.obsearch.index.utils.AbstractNewLineCommandLine<O,I,A>
- All Implemented Interfaces:
- org.opt4j.core.problem.Evaluator<org.opt4j.benchmark.DoubleString>
- Direct Known Subclasses:
- AbstractNewLineBytesCommandLine, AbstractNewLineCommandLineShort
public abstract class AbstractNewLineCommandLine<O extends OB,I extends Index<O>,A extends Ambient<O,I>>
- extends AbstractCommandLine<O,I,A>
Field Summary |
protected int |
maxLoad
|
Fields inherited from class net.obsearch.index.utils.AbstractCommandLine |
approxEvalEp, approxEvalRecall, bulkMode, experimentName, experimentResultFileName, experimentSet, iterations, k, maxQueries, mode, optNumChildren, optNumParents, optPopulationSize, pivots, props, queries, r, time, validate |
Method Summary |
protected void |
addObjects(I index,
File load)
Adds objects to the index. |
protected abstract O |
instantiate(String line)
Instantiate an object from a string. |
protected boolean |
isValidObject(O object)
Override this if some objects should not be accepted. |
protected abstract void |
searchObject(I index,
O object,
Statistics other)
The subclass implements this method and decides to print or do something
with the result. |
protected abstract void |
searchObjectApprox(I index,
O object,
Statistics other)
Search object in approx mode. |
protected void |
searchObjects(I index,
File load,
Statistics other)
Opens a query file and queries the index storing all the results there. |
Methods inherited from class net.obsearch.index.utils.AbstractCommandLine |
add, closeAll, create, evaluate, expDetails, expName, getCreator, getIndex, getObjectives, getReference, initProperties, instantiateAmbient, instantiateNewAmbient, isApproxMode, processUserCommands, search, searchAux, updateIndexConfig, updateParams, writeAll |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maxLoad
protected int maxLoad
AbstractNewLineCommandLine
public AbstractNewLineCommandLine()
addObjects
protected void addObjects(I index,
File load)
throws IOException,
OBStorageException,
OBException,
IllegalAccessException,
InstantiationException
- Description copied from class:
AbstractCommandLine
- Adds objects to the index. Loads the objects from File.
- Specified by:
addObjects
in class AbstractCommandLine<O extends OB,I extends Index<O>,A extends Ambient<O,I>>
- Parameters:
index
- Index to load the objects into.load
- File to load.
- Throws:
FileNotFoundException
IOException
OBStorageException
OBException
IllegalAccessException
InstantiationException
isValidObject
protected boolean isValidObject(O object)
throws OBException
- Override this if some objects should not be accepted.
- Parameters:
object
-
- Returns:
-
- Throws:
OBException
searchObjects
protected void searchObjects(I index,
File load,
Statistics other)
throws IOException,
OBException,
InstantiationException,
IllegalAccessException
- Description copied from class:
AbstractCommandLine
- Opens a query file and queries the index storing all the results there.
- Specified by:
searchObjects
in class AbstractCommandLine<O extends OB,I extends Index<O>,A extends Ambient<O,I>>
- Parameters:
index
- The index to query.load
- The query to load.
- Throws:
IOException
OBException
InstantiationException
IllegalAccessException
searchObject
protected abstract void searchObject(I index,
O object,
Statistics other)
throws NotFrozenException,
IllegalIdException,
OutOfRangeException,
InstantiationException,
IllegalAccessException,
OBException,
IOException
- The subclass implements this method and decides to print or do something
with the result.
- Parameters:
index
- The index to be searched.object
- The object to search.
- Throws:
OBException
IllegalAccessException
InstantiationException
OutOfRangeException
IllegalIdException
NotFrozenException
IOException
searchObjectApprox
protected abstract void searchObjectApprox(I index,
O object,
Statistics other)
throws NotFrozenException,
IllegalIdException,
OutOfRangeException,
InstantiationException,
IllegalAccessException,
OBException,
IOException
- Search object in approx mode.
- Parameters:
index
- The index to be searched.object
- The object to search.
- Throws:
OBException
IllegalAccessException
InstantiationException
OutOfRangeException
IllegalIdException
NotFrozenException
IOException
instantiate
protected abstract O instantiate(String line)
throws OBException
- Instantiate an object from a string.
- Returns:
- The object
- Throws:
OBException
Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.