}
}
}
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
if( relationship == LifeSpan.ALLEN_OVERLAPS ||
relationship == LifeSpan.ALLEN_DURING ||
relationship == LifeSpan.ALLEN_EQUAL ||