/// <summary> /// Clears the <see cref="_verticesEdgesCache"/> but keep a trace of explored vertices /// in the <see cref="_verticesNotProcessedCache"/>. /// </summary> private void MoveMainCacheToNotProcessedVertices() { foreach (TVertex vertex in _verticesEdgesCache.Keys) { Debug.Assert(!_verticesNotProcessedCache.ContainsKey(vertex)); _verticesNotProcessedCache.Add(vertex, new HashSet <ITransitionFactory <TVertex, TEdge> >()); } _verticesEdgesCache.Clear(); // Cache no longer valid }
public void Clear() { _adjacentEdges.Clear(); EdgeCount = 0; }