net.obsearch.index.utils
Class AbstractNewLineBytesCommandLine<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>
net.obsearch.index.utils.AbstractNewLineBytesCommandLine<O,I,A>
- All Implemented Interfaces:
- org.opt4j.core.problem.Evaluator<org.opt4j.benchmark.DoubleString>
public abstract class AbstractNewLineBytesCommandLine<O extends OB,I extends Index<O>,A extends Ambient<O,I>>
- extends AbstractNewLineCommandLine<O,I,A>
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 int |
arraySize()
Read a byte array with the given size; |
protected abstract O |
instantiate(byte[] line)
Instantiate an object from a fixed byte array; |
protected O |
instantiate(String line)
Instantiate an object from a string. |
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 |
AbstractNewLineBytesCommandLine
public AbstractNewLineBytesCommandLine()
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.
- Overrides:
addObjects
in class AbstractNewLineCommandLine<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
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.
- Overrides:
searchObjects
in class AbstractNewLineCommandLine<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
arraySize
protected abstract int arraySize()
- Read a byte array with the given size;
- Returns:
instantiate
protected abstract O instantiate(byte[] line)
throws OBException
- Instantiate an object from a fixed byte array;
- Returns:
- The object
- Throws:
OBException
instantiate
protected O instantiate(String line)
throws OBException
- Instantiate an object from a string.
- Specified by:
instantiate
in class AbstractNewLineCommandLine<O extends OB,I extends Index<O>,A extends Ambient<O,I>>
- Returns:
- The object
- Throws:
OBException
Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.