예제 #1
0
 protected virtual void OnStep(FinderEventArgs e)
 {
     _stopwatch.Stop();
     StepConfig(e.GridMap);
     e.GridMap.UpdateMaxNodes();
     Step?.Invoke(this, e);
     _stopwatch.Start();
 }
예제 #2
0
        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);
        }
예제 #3
0
 protected virtual void OnStart(FinderEventArgs e)
 {
     Start?.Invoke(this, e);
     _stopwatch.Reset();
     _stopwatch.Start();
 }
예제 #4
0
 protected virtual void OnEnd(FinderEventArgs e)
 {
     _stopwatch.Stop();
     End?.Invoke(this, e);
 }