|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.obsearch.index.utils.AbstractCommandLine<O,I,A>
public abstract class AbstractCommandLine<O extends OB,I extends Index<O>,A extends Ambient<O,I>>
Nested Class Summary | |
---|---|
protected static class |
AbstractCommandLine.Mode
|
Field Summary | |
---|---|
protected double |
approxEvalEp
|
protected double |
approxEvalRecall
|
protected boolean |
bulkMode
|
protected String |
experimentName
|
protected String |
experimentResultFileName
|
protected String |
experimentSet
|
protected int |
iterations
Options related to opt4j optimization |
protected int |
k
|
protected int |
maxQueries
|
protected AbstractCommandLine.Mode |
mode
|
protected int |
optNumChildren
|
protected int |
optNumParents
|
protected int |
optPopulationSize
|
protected int |
pivots
|
protected Properties |
props
Properties that modify the behavior of this application. |
protected int |
queries
Number of queries executed. |
protected double |
r
|
protected long |
time
Total ellapsed time during each query. |
protected boolean |
validate
|
Constructor Summary | |
---|---|
AbstractCommandLine()
|
Method Summary | |
---|---|
protected void |
add()
|
protected abstract void |
addObjects(I index,
File load)
Adds objects to the index. |
protected void |
closeAll(FileWriter[] files)
|
protected void |
create()
|
org.opt4j.core.Objectives |
evaluate(org.opt4j.benchmark.DoubleString config)
|
protected abstract String |
expDetails()
|
protected String |
expName()
|
protected abstract org.opt4j.core.problem.Creator<org.opt4j.benchmark.DoubleString> |
getCreator()
Returns the creator used to generate new configurations for this index. |
protected I |
getIndex()
|
Collection<org.opt4j.core.Objective> |
getObjectives()
|
protected abstract AbstractCommandLine |
getReference()
Return the "this" reference, used to access all the command line options. |
void |
initProperties()
|
protected abstract A |
instantiateAmbient(File dbFolder)
|
protected abstract A |
instantiateNewAmbient(File dbFolder)
|
protected boolean |
isApproxMode()
|
void |
processUserCommands(String[] args)
This method must be called by the children of this class. |
protected void |
search()
Perform one search for a given k and r. |
protected Pair<Statistics,Statistics> |
searchAux()
|
protected abstract void |
searchObjects(I index,
File query,
Statistics other)
Opens a query file and queries the index storing all the results there. |
protected abstract void |
updateIndexConfig(org.opt4j.benchmark.DoubleString phenotype)
Updates the configuration of the index with the given phenotype. |
protected abstract void |
updateParams()
Updates the underlying index based on different parameters |
protected void |
writeAll(FileWriter[] files,
String str)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Properties props
protected int pivots
protected int k
protected AbstractCommandLine.Mode mode
protected int maxQueries
protected String experimentName
protected String experimentResultFileName
protected boolean bulkMode
protected String experimentSet
protected double r
protected double approxEvalEp
protected double approxEvalRecall
protected int iterations
protected int optPopulationSize
protected int optNumParents
protected int optNumChildren
protected boolean validate
protected int queries
protected long time
Constructor Detail |
---|
public AbstractCommandLine()
Method Detail |
---|
public void initProperties() throws IOException
IOException
protected abstract AbstractCommandLine getReference()
protected I getIndex()
public void processUserCommands(String[] args)
thisReference
- this reference of the subclass.args
- Arguments sent to the application.protected abstract A instantiateNewAmbient(File dbFolder) throws OBStorageException, OBException, FileNotFoundException, IllegalAccessException, InstantiationException, IOException
OBStorageException
OBException
FileNotFoundException
IllegalAccessException
InstantiationException
IOException
protected abstract A instantiateAmbient(File dbFolder) throws OBStorageException, OBException, FileNotFoundException, IllegalAccessException, InstantiationException, IOException
OBStorageException
OBException
FileNotFoundException
IllegalAccessException
InstantiationException
IOException
protected abstract void addObjects(I index, File load) throws FileNotFoundException, IOException, OBStorageException, OBException, IllegalAccessException, InstantiationException
index
- Index to load the objects into.load
- File to load.
FileNotFoundException
IOException
OBStorageException
OBException
IllegalAccessException
InstantiationException
protected abstract void searchObjects(I index, File query, Statistics other) throws IOException, OBException, InstantiationException, IllegalAccessException
index
- The index to query.query
- The query to load.
IOException
OBException
InstantiationException
IllegalAccessException
protected void create() throws IOException, OBStorageException, OBException, com.sleepycat.je.DatabaseException, InstantiationException, IllegalAccessException, PivotsUnavailableException
IOException
OBStorageException
OBException
com.sleepycat.je.DatabaseException
InstantiationException
IllegalAccessException
PivotsUnavailableException
protected void add() throws IOException, OBStorageException, OBException, com.sleepycat.je.DatabaseException, InstantiationException, IllegalAccessException
IOException
OBStorageException
OBException
com.sleepycat.je.DatabaseException
InstantiationException
IllegalAccessException
public Collection<org.opt4j.core.Objective> getObjectives()
getObjectives
in interface org.opt4j.core.problem.Evaluator<org.opt4j.benchmark.DoubleString>
protected abstract org.opt4j.core.problem.Creator<org.opt4j.benchmark.DoubleString> getCreator() throws OBException
OBException
public org.opt4j.core.Objectives evaluate(org.opt4j.benchmark.DoubleString config)
evaluate
in interface org.opt4j.core.problem.Evaluator<org.opt4j.benchmark.DoubleString>
protected abstract void updateIndexConfig(org.opt4j.benchmark.DoubleString phenotype)
phenotype
- protected String expName()
protected void writeAll(FileWriter[] files, String str) throws IOException
IOException
protected void closeAll(FileWriter[] files) throws IOException
IOException
protected abstract void updateParams()
protected Pair<Statistics,Statistics> searchAux() throws IOException, OBStorageException, OBException, com.sleepycat.je.DatabaseException, InstantiationException, IllegalAccessException
IOException
OBStorageException
OBException
com.sleepycat.je.DatabaseException
InstantiationException
IllegalAccessException
protected boolean isApproxMode()
protected abstract String expDetails()
protected void search() throws IOException, OBStorageException, OBException, com.sleepycat.je.DatabaseException, InstantiationException, IllegalAccessException
IOException
OBStorageException
OBException
com.sleepycat.je.DatabaseException
InstantiationException
IllegalAccessException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |