protected virtual void OnStep(FinderEventArgs e) { _stopwatch.Stop(); StepConfig(e.GridMap); e.GridMap.UpdateMaxNodes(); Step?.Invoke(this, e); _stopwatch.Start(); }
protected FinderEventArgs BuildArgs(int i, IMap map, bool finded = false) { var args = new FinderEventArgs { PassedTimeInMs = _stopwatch.ElapsedMilliseconds, Step = i, ExpandedNodesCount = map.ClosedListCount() + map.OpenListCount(), Finded = finded, GridMap = map }; return(args); }
protected virtual void OnStart(FinderEventArgs e) { Start?.Invoke(this, e); _stopwatch.Reset(); _stopwatch.Start(); }
protected virtual void OnEnd(FinderEventArgs e) { _stopwatch.Stop(); End?.Invoke(this, e); }