Package edu.gsu.cs.dmlab.indexes
Class BasicTrackIndexer
- java.lang.Object
-
- edu.gsu.cs.dmlab.indexes.interfaces.AbsMatIndexer<ISTTrackingTrajectory>
-
- edu.gsu.cs.dmlab.indexes.BasicTrackIndexer
-
- All Implemented Interfaces:
IIndexer<ISTTrackingTrajectory>
,ISTTrackingTrajectoryIndexer
public class BasicTrackIndexer extends AbsMatIndexer<ISTTrackingTrajectory> implements ISTTrackingTrajectoryIndexer
This class provides event indexing for ISTTrackingTrajectory objects. The indexing is based on a grid of ArrayLists, where the grid represents the space over which the index is valid. The ArrayLists in each location of the grid are used to sort the ISTTrackingTrajectory objects that intersect each spatial coordinate based on time.- Author:
- Thaddeus Gholston, Data Mining Lab, Georgia State University
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.gsu.cs.dmlab.indexes.interfaces.AbsMatIndexer
AbsMatIndexer.LockingArrayList<B>
-
-
Field Summary
-
Fields inherited from class edu.gsu.cs.dmlab.indexes.interfaces.AbsMatIndexer
objectList, regionDimension, regionDivisor, searchSpace
-
-
Constructor Summary
Constructors Constructor Description BasicTrackIndexer(List<ISTTrackingTrajectory> list, int regionDimension, int regionDiv, int numThreads)
Constructor, constructs a new BasicTrackindexer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
buildIndex()
The function that indexes the passed in objects.void
finalize()
ArrayList<ISTTrackingTrajectory>
getAll()
Returns the list of all objects in the index.-
Methods inherited from class edu.gsu.cs.dmlab.indexes.interfaces.AbsMatIndexer
getFirstTime, getLastTime, search
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.gsu.cs.dmlab.indexes.interfaces.IIndexer
getFirstTime, getLastTime, search
-
-
-
-
Constructor Detail
-
BasicTrackIndexer
public BasicTrackIndexer(List<ISTTrackingTrajectory> list, int regionDimension, int regionDiv, int numThreads) throws IllegalArgumentException
Constructor, constructs a new BasicTrackindexer.- Parameters:
list
- The list of tracks to index.regionDimension
- The length for both the x and y spatial domain. For example x will be valid for [0, regionDimension].regionDiv
- The divisor used to down size each of the ISTTrackingTrajectory objects to fit inside the spatial domain specified by the regionDimension parameter.numThreads
- The number of threads to use when processing batch. -1 for all available > 0 for a specific number. JavaEE doesn't seem to like more than one thread, so only use 1 for applications built for web application servers.- Throws:
IllegalArgumentException
- When any of the passed in arguments are null, or if the regionDimension is less than 1 same with divisor.
-
-
Method Detail
-
finalize
public void finalize() throws Throwable
- Overrides:
finalize
in classAbsMatIndexer<ISTTrackingTrajectory>
- Throws:
Throwable
-
buildIndex
protected void buildIndex()
Description copied from class:AbsMatIndexer
The function that indexes the passed in objects. Since each object is different in how it is indexed, this is implemented by each index implementation. This must be called before any spatial query will return the correct list of objects.- Specified by:
buildIndex
in classAbsMatIndexer<ISTTrackingTrajectory>
-
getAll
public ArrayList<ISTTrackingTrajectory> getAll()
Description copied from interface:IIndexer
Returns the list of all objects in the index.- Specified by:
getAll
in interfaceIIndexer<ISTTrackingTrajectory>
- Overrides:
getAll
in classAbsMatIndexer<ISTTrackingTrajectory>
- Returns:
- A list of all the objects in the index.
-
-