Package ch.epfl.lbd.database.temporal

Examples of ch.epfl.lbd.database.temporal.LifeSpan


 
  protected ArrayList<Double> speeds;
  
  public Episode(){
    speeds = new ArrayList<Double>();
    lifeSpan = new LifeSpan();
   
    avgSpeed = 0;
    varSpeed = 0;
   
    distance = 0;
View Full Code Here


  public Episode(GPSPoint point){
    speeds = new ArrayList<Double>();

    Date endTime = new Date();
    endTime.setTime(point.getDatetime().getTime()+(long)point.getDuration());
    lifeSpan = new LifeSpan(point.getDatetime(),endTime);
   
    avgSpeed = point.getSpeed();
    speeds.add(point.getSpeed());
    varSpeed = 0;
    distance = point.getDistance();
View Full Code Here

 
  protected int numOfStops = 0;
  protected int numOfMoves = 0;
 
  public Trajectory(){
    lifeSpan = new LifeSpan();
    mObject = new MovingObject();
    episodes = new ArrayList<Episode>();
  }
View Full Code Here

    return result / episodes.size();
  }
 
  public Trajectory(int id, int owner){
    this.id = id;
    lifeSpan = new LifeSpan();
    mObject = new MovingObject(owner);
    episodes = new ArrayList<Episode>();
  }
View Full Code Here

      }
    }
  }
 
  private boolean similar(Trajectory trj, Trajectory model){
    LifeSpan lifeSpanTolerance = (LifeSpan)parameters[1];
    LifeSpan trj_augmented = trj.getLifeSpan();
    trj_augmented.setStart(lifeSpanTolerance.getStart().before(trj_augmented.getStart()) ? lifeSpanTolerance.getStart() : trj_augmented.getStart() );
    trj_augmented.setEnd(lifeSpanTolerance.getEnd().after(trj_augmented.getEnd()) ? lifeSpanTolerance.getEnd() : trj_augmented.getEnd() );
    int relationship = trj_augmented.relationship(model.getLifeSpan());
   
    //check temporal coexistence
    ifrelationship == LifeSpan.ALLEN_OVERLAPS ||
      relationship == LifeSpan.ALLEN_DURING   ||
      relationship == LifeSpan.ALLEN_EQUAL   ||
View Full Code Here

TOP

Related Classes of ch.epfl.lbd.database.temporal.LifeSpan

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.