Package edu.gsu.cs.dmlab.temporal
Class TemporalAligner
- java.lang.Object
-
- edu.gsu.cs.dmlab.temporal.TemporalAligner
-
- All Implemented Interfaces:
ITemporalAligner
public class TemporalAligner extends Object implements ITemporalAligner
Performs minor adjustments to the timestamp of a spatiotemporal event report to align with an epoch and step size in interpolation methods described in Boubrahimi et. al, 2018.- Author:
- Dustin Kempton, Data Mining Lab, Georgia State University
-
-
Constructor Summary
Constructors Constructor Description TemporalAligner(IInterpolationFactory factory, org.joda.time.DateTime epoch, org.joda.time.Duration step, RoundingStrategy strategy)
Constructor that provides an epoch that is used to align the timestamp of each event report in passed in trajectories against.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISTInterpolationEvent
alignEventsForInterpolation(ISTInterpolationEvent input)
ISTInterpolationTrajectory
alignEventsForStepFromEpoch(ISTInterpolationTrajectory trajectory)
Takes all of the event reports within the trajectory and aligns them to an integer multiple of some step size starting from some epoch.
-
-
-
Constructor Detail
-
TemporalAligner
public TemporalAligner(IInterpolationFactory factory, org.joda.time.DateTime epoch, org.joda.time.Duration step, RoundingStrategy strategy)
Constructor that provides an epoch that is used to align the timestamp of each event report in passed in trajectories against. The alignment forces the timestamps to be an integer multiple number of steps from the input epoch time. The rounding strategy is also provided, it can be UP, DOWN, or ROUND. Where UP always takes the timestamp to the next closest integer multiple, down always takes the timestamp to the previous, and ROUND takes it to the closest integer multiple.- Parameters:
factory
- The factory used to create new objects to returnepoch
- The epoch time to align againststep
- The step to use to force the timestamps to be an integer multiple ofstrategy
- The rounding strategy
-
-
Method Detail
-
alignEventsForStepFromEpoch
public ISTInterpolationTrajectory alignEventsForStepFromEpoch(ISTInterpolationTrajectory trajectory)
Description copied from interface:ITemporalAligner
Takes all of the event reports within the trajectory and aligns them to an integer multiple of some step size starting from some epoch. The original input data should remain unchanged and new instances of each of the objects that compose the trajectory should be created.- Specified by:
alignEventsForStepFromEpoch
in interfaceITemporalAligner
- Parameters:
trajectory
- The input trajectory that will be processed.- Returns:
- A new trajectory with each of the internal event reports aligned so that their time stamps are an integer multiple of some step size starting from some epoch.
-
alignEventsForInterpolation
public ISTInterpolationEvent alignEventsForInterpolation(ISTInterpolationEvent input)
- Specified by:
alignEventsForInterpolation
in interfaceITemporalAligner
-
-