Class TreeBasedEventIndexer

    • Constructor Detail

      • TreeBasedEventIndexer

        public TreeBasedEventIndexer​(ArrayList<ISTTrackingEvent> regionalList,
                                     int regionDivisor,
                                     org.joda.time.Duration frameSpan)
                              throws IllegalArgumentException
        Constructor, constructs a new TreeBasedEventIndexer.
        Parameters:
        regionalList - The list of IEvent objects to add to the index.
        regionDivisor - The divisor used to down size each of the IEvent objects to fit inside the spatial domain specified by the regionDimension parameter.
        frameSpan - The length of a frame in the index. This is used to compute the expected change in detections per frame.
        Throws:
        IllegalArgumentException - When any of the passed in arguments are null, or if the regionDivisor is less than 1 same with frame span.
    • Method Detail

      • getFirstTime

        public org.joda.time.DateTime getFirstTime()
        Description copied from interface: IIndexer
        Gets the earliest start time in the index. That way you can check before you waste time querying the index for objects that don't exist.
        Specified by:
        getFirstTime in interface IIndexer<ISTTrackingEvent>
        Returns:
        The earliest start time in the index.
      • getLastTime

        public org.joda.time.DateTime getLastTime()
        Description copied from interface: IIndexer
        Gets the latest end time in the index. That way you can check before you waste time querying the index for objects that don't exist.
        Specified by:
        getLastTime in interface IIndexer<ISTTrackingEvent>
        Returns:
        The latest end time in the index.
      • search

        public ArrayList<ISTTrackingEvent> search​(org.joda.time.Interval timePeriod,
                                                  org.locationtech.jts.geom.Geometry searchArea)
        Description copied from interface: IIndexer
        Searches the index for any objects that intersect the query time and the query search area. This method is intended to look forward in time for these objects as is done to find the next possible detection for a given detection.
        Specified by:
        search in interface IIndexer<ISTTrackingEvent>
        Parameters:
        timePeriod - The time period to query the index with.
        searchArea - The search area to search for intersections with.
        Returns:
        A list of the objects in the index that intersect the query time and the query search area.
      • getExpectedChangePerFrame

        public int getExpectedChangePerFrame​(org.joda.time.Interval timePeriod)
        Description copied from interface: ISTTrackingEventIndexer
        Computes the expected change in the number of detections in each frame. The length of the frame is set internally but the time that this expected change is to be computed over is passed in as a parameter.
        Specified by:
        getExpectedChangePerFrame in interface ISTTrackingEventIndexer
        Parameters:
        timePeriod - The period over which the expected change is to be computed.
        Returns:
        The expected change in the number of detections per frame based on the passed in period of time.