private bool CanReach(Vertex <T> from, Vertex <T> to) { ResetAccessed(); return(from.CanReach(to)); }
private void AddPathInternal(Vertex <T> fromVertex, Vertex <T> toVertex) { ValidateCycle(fromVertex, toVertex); fromVertex.AddOutcomming(toVertex); toVertex.AddIncomming(fromVertex); }
private IEnumerable <Vertex <T> > GetSubOf(Vertex <T> root) { ResetAccessed(); return(root.GetSubVertices().Distinct()); }
private void Remove(Vertex <T> vertex) { vertex.Incommings.ToList().ForEach(i => i.Outcommings.Remove(vertex)); vertex.Outcommings.ToList().ForEach(o => o.Incommings.Remove(vertex)); vertices.Remove(vertex.Data); }