public void AddEntry(DistanceVectorEntry <TNode> entry) { var e = _entries.Where(x => x.Destination == entry.Destination).FirstOrDefault(); if (e != null) { _entries.Remove(e); } if (entry.Distance > InfiniteWeight) { return; } _entries.Add(entry); }
public bool Equals(DistanceVectorEntry <TNode> other) { return(Destination == other.Destination); }