optimized directed graph with local functions
parent
810ca03112
commit
8b036bb990
|
@ -129,8 +129,7 @@ namespace Encompass
|
|||
output.Add(vertex, new Dictionary<SearchSymbol, uint>());
|
||||
}
|
||||
|
||||
Action<T> dfsHelper = null;
|
||||
dfsHelper = (T v) =>
|
||||
void dfsHelper(T v)
|
||||
{
|
||||
discovered.Add(v);
|
||||
time += 1;
|
||||
|
@ -259,8 +258,7 @@ namespace Encompass
|
|||
|
||||
public IEnumerable<IEnumerable<T>> SimpleCycles()
|
||||
{
|
||||
Action<T, HashSet<T>, Dictionary<T, HashSet<T>>> unblock = null;
|
||||
unblock = (T thisnode, HashSet<T> blocked, Dictionary<T, HashSet<T>> B) =>
|
||||
void unblock(T thisnode, HashSet<T> blocked, Dictionary<T, HashSet<T>> B)
|
||||
{
|
||||
var stack = new Stack<T>();
|
||||
stack.Push(thisnode);
|
||||
|
|
Loading…
Reference in New Issue