public void Subtract(Hlm_Chewbacca <T> set) { foreach (T tItem in new List <T>(mp_element_f.Keys)) { if (set.Contains(tItem)) { Remove(tItem); } } }
private IEnumerable <Stack <T> > FindPathRecursive(Stack <T> rgt, Hlm_Chewbacca <T> ohlmtVisited, int depth, Depthmax depthMax) { var t = rgt.Peek(); if (dgfGoal(t)) { depthMax.D = depth; yield return(new Stack <T>(rgt)); yield break; } if (depth == depthMax.D) { depthMax.ccut++; yield break; } foreach (var tNext in EntNext(rgt, ohlmtVisited)) { if (ohlmtVisited != null) { if (ohlmtVisited.Contains(tNext)) { continue; } ohlmtVisited.Add(tNext); } rgt.Push(tNext); foreach (var tSolution in FindPathRecursive(rgt, ohlmtVisited, depth + 1, depthMax)) { yield return(tSolution); } if (ohlmtVisited != null) { ohlmtVisited.Remove(tNext); } rgt.Pop(); } }