Exemple #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);
 }
Exemple #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);
 }
Exemple #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();
        }