|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.preprocessing.PreprocessorHandler<O,P>
O
- the type of DatabaseObject to run the Preprocessor onP
- the type of Preprocessor usedpublic class PreprocessorHandler<O extends DatabaseObject,P extends Preprocessor<O>>
Handler class for all objects (e.g. distance functions) using a preprocessor running on a certain database.
Field Summary | |
---|---|
private AssociationID<?> |
associationID
The association ID for the association to be set by the preprocessor. |
private Database<O> |
database
The database to run the preprocessor on. |
private boolean |
omit
Holds the value of OMIT_PREPROCESSING_FLAG . |
private Flag |
OMIT_PREPROCESSING_FLAG
Flag to omit (a new) preprocessing if for each object the association has already been set. |
static OptionID |
OMIT_PREPROCESSING_ID
OptionID for OMIT_PREPROCESSING_FLAG |
private P |
preprocessor
Holds the instance of the preprocessor specified by PREPROCESSOR_PARAM . |
static OptionID |
PREPROCESSOR_ID
OptionID for PREPROCESSOR_PARAM |
private ObjectParameter<P> |
PREPROCESSOR_PARAM
Parameter to specify the preprocessor to be used, must extend at least Preprocessor . |
private boolean |
time
Indicates if the time flag is set for preprocessing. |
private boolean |
verbose
Indicates if the verbose flag is set for preprocessing. |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug, logger |
Constructor Summary | |
---|---|
PreprocessorHandler(Parameterization config,
PreprocessorClient<P,O> preprocessorClient)
Constructor, supporting Parameterizable |
Method Summary | |
---|---|
P |
getPreprocessor()
Returns the preprocessor. |
void |
objectsChanged(DatabaseEvent e)
Invoked after objects of the database have been updated in some way. |
void |
objectsInserted(DatabaseEvent e)
Invoked after an object has been inserted into the database. |
void |
objectsRemoved(DatabaseEvent e)
Invoked after an object has been deleted from the database. |
void |
runPreprocessor(Database<O> database)
Runs the preprocessor on the database if the omit flag is not set or the database does contain the association id neither for any id nor as global association. |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final OptionID PREPROCESSOR_ID
PREPROCESSOR_PARAM
private final ObjectParameter<P extends Preprocessor<O>> PREPROCESSOR_PARAM
Preprocessor
.
Key: -distancefunction.preprocessor
private P extends Preprocessor<O> preprocessor
PREPROCESSOR_PARAM
.
public static final OptionID OMIT_PREPROCESSING_ID
OMIT_PREPROCESSING_FLAG
private final Flag OMIT_PREPROCESSING_FLAG
Key: -distancefunction.omitPreprocessing
private boolean omit
OMIT_PREPROCESSING_FLAG
.
private AssociationID<?> associationID
private boolean verbose
private boolean time
private Database<O extends DatabaseObject> database
Constructor Detail |
---|
public PreprocessorHandler(Parameterization config, PreprocessorClient<P,O> preprocessorClient)
Parameterizable
config
- ParameterizationpreprocessorClient
- the class using this handlerMethod Detail |
---|
public void objectsChanged(DatabaseEvent e)
OMIT_PREPROCESSING_FLAG
is not set.
objectsChanged
in interface DatabaseListener
e
- unusedpublic void objectsInserted(DatabaseEvent e)
OMIT_PREPROCESSING_FLAG
is not set.
objectsInserted
in interface DatabaseListener
e
- unusedpublic void objectsRemoved(DatabaseEvent e)
OMIT_PREPROCESSING_FLAG
is not set.
objectsRemoved
in interface DatabaseListener
e
- unusedpublic P getPreprocessor()
PREPROCESSOR_PARAM
public void runPreprocessor(Database<O> database)
database
- the database to run the preprocessor on
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |