In MiniGUi, I can see db.index
. How do I set it to tree.spatial.rstarvariants.rstar.RStartTreeFactory
via Java code?
I have implemented:
params.addParameter(AbstractDatabase.Parameterizer.INDEX_ID,tree.spatial.rstarvariants.rstar.RStarTreeFactory);
For the second parameter of addParameter()
function tree.spatial...RStarTreeFactory
class not found
// Setup parameters:
ListParameterization params = new ListParameterization();
params.addParameter(
FileBasedDatabaseConnection.Parameterizer.INPUT_ID,
fileLocation);
params.addParameter(AbstractDatabase.Parameterizer.INDEX_ID,
RStarTreeFactory.class);
I am getting NullPointerException
. Did I use RStarTreeFactory.class
correctly?
The ELKI command line (and MiniGui; which is a command line builder) allow to specify shorthand class names, leaving out the package prefix of the implemented interface.
The full command line documentation yields:
I.e. for this parameter, the class prefix
de.lmu.ifi.dbs.elki.index.
may be omitted.The full class name thus is:
or you just type
RStarTreeFactory
, and let eclipse auto-repair the import:See also: Geo Indexing example in the tutorial folder.