Esempio n. 1
0
void
Trace::UpdateDelta(TraceDelta &td)
{
  assert(cached_size == delta_list.size());
  assert(cached_size == chronological_list.Count());

  if (chronological_list.IsEdge(td))
    return;

  const TraceDelta &previous = td.GetPrevious();
  const TraceDelta &next = td.GetNext();

  TraceDelta temp_td = td;
  temp_td.SetDisconnected();

  td.Replace(temp_td);

  // erase old one
  auto i = delta_list.find(td);
  assert(i != delta_list.end());
  delta_list.erase(i);

  // insert new in sorted position
  temp_td.Update(previous.point, next.point);
  TraceDelta &new_td = Insert(temp_td);
  new_td.SetDisconnected();
  temp_td.Replace(new_td);
}
Esempio n. 2
0
/**
 * Update start node (and neighbour) after min time pruning
 */
void
Trace::erase_start(TraceDelta &td_start) {
  TraceDelta temp_td = td_start;
  temp_td.SetDisconnected();
  td_start.Replace(temp_td);

  TraceDelta::iterator i_start = td_start.delta_list_iterator;
  delta_list.erase(i_start);
  temp_td.elim_distance = null_delta;
  temp_td.elim_time = null_time;

  TraceDelta &new_td = insert(temp_td);
  new_td.SetDisconnected();
  temp_td.Replace(new_td);
}
Esempio n. 3
0
/**
 * Update start node (and neighbour) after min time pruning
 */
void
Trace::EraseStart(TraceDelta &td_start) {
  TraceDelta temp_td = td_start;
  temp_td.SetDisconnected();
  td_start.Replace(temp_td);

  auto i_start = delta_list.find(td_start);
  assert(i_start != delta_list.end());
  delta_list.erase(i_start);

  temp_td.elim_distance = null_delta;
  temp_td.elim_time = null_time;

  TraceDelta &new_td = Insert(temp_td);
  new_td.SetDisconnected();
  temp_td.Replace(new_td);
}