예제 #1
0
 public Dijkstra(int len, Allocator allocator)
 {
     frontier   = new NativePriorityQueue <T>(len, allocator);
     cameFrom   = new NativeHashMap <T, T>(len, allocator);
     costs      = new NativeHashMap <T, int>(len, allocator);
     neighbours = new NativeList <T>(8, allocator);
 }
예제 #2
0
 public AStar(int len, Allocator allocator)
 {
     _frontier   = new NativePriorityQueue <T>(len, allocator);
     _parents    = new NativeHashMap <T, T>(len, allocator);
     _costs      = new NativeHashMap <T, int>(len, allocator);
     _neighbours = new NativeList <T>(8, allocator);
 }
예제 #3
0
        public AStarArrays(int len, Allocator allocator)
        {
            _frontier   = new NativePriorityQueue <int>(len, allocator);
            _parents    = new NativeArray <int>(len, allocator);
            _costs      = new NativeArray <int>(len, allocator);
            _neighbours = new NativeList <int>(len, allocator);

            Clear();
        }