Пример #1
0
        public BFS(IEnumerable<IntVector3> initialLocations, IBFSTarget target)
        {
            this.MaxNodeCount = 200000;
            this.CancellationToken = CancellationToken.None;

            m_target = target;
            m_map = new HashSet<IntVector3>();
            m_queue = new Queue<IntVector3>();

            foreach (var p in initialLocations)
            {
                m_map.Add(p);
                m_queue.Enqueue(p);
            }
        }
Пример #2
0
        public BFS(IEnumerable <IntVector3> initialLocations, IBFSTarget target)
        {
            this.MaxNodeCount      = 200000;
            this.CancellationToken = CancellationToken.None;

            m_target = target;
            m_map    = new HashSet <IntVector3>();
            m_queue  = new Queue <IntVector3>();

            foreach (var p in initialLocations)
            {
                m_map.Add(p);
                m_queue.Enqueue(p);
            }
        }