FASTkNN index can but utilized by the edu.purdue.cs.fast.FAST class. Following is a simple example of FASTkNN usage.
Refer to experiments package for more detailed examples.
import edu.purdue.cs.fast.config.CleanMethod;
import edu.purdue.cs.fast.models.Rectangle;
Config config = new Config();
config.KNN_OMEGA =0.2;
Rectangle spatialBounds = new Rectangle(new Point(0.0, 0.0), new Point(512.0, 512.0));
FAST index = new FAST(
config,
spatialBounds,
512,
9
);
index.setExternalObjectIndex(512, 9);
index.insertQuery(...);
index.insertObject(...);src/main/java/<package>contains the extension of FAST to support KNN queries.src/main/java/<package>/baselinescontains the following baselines.ckqst- Reproduction of the paper "Continuous k Nearest Neighbor Queries over Large-Scale Spatial–Textual Data Streams"fast- Original FAST index for continuous MBR queriesquadtree- Implementation of a base quadtree
src/test/java/<package>contains the tests for FAST extension and baselines.analysiscontains notebooks with different analysis done.datacontains samples of the datasets.
cd <project_root>
# Build the project
mvn package -Dmaven.test.skip
# Run a experiment (update the required fields within `run_fast.sh`)
./run_fast.sh