removed gridSize from the template arguments
- not needed and code much cleaner some minor changes new test-cases
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
TEST(Dijkstra, build) {
|
||||
|
||||
Grid<1, GP> grid;
|
||||
Grid<GP> grid(1);
|
||||
|
||||
int idx1 = grid.add(GP( 0, 0, 0));
|
||||
int idx2 = grid.add(GP( 0, 1, 0));
|
||||
@@ -22,9 +22,9 @@ TEST(Dijkstra, build) {
|
||||
grid.connectBiDir(idx1, idx5);
|
||||
|
||||
class TMP {
|
||||
Grid<1, GP>& grid;
|
||||
Grid<GP>& grid;
|
||||
public:
|
||||
TMP(Grid<1, GP>& grid) : grid(grid) {;}
|
||||
TMP(Grid<GP>& grid) : grid(grid) {;}
|
||||
int getNumNeighbors(const GP& node) const {return node.getNumNeighbors();}
|
||||
const GP* getNeighbor(const GP& node, const int idx) const {return &grid.getNeighbor(node, idx);}
|
||||
float getWeightBetween(const GP& n1, const GP& n2) const {return ((Point3)n1 - (Point3)n2).length();}
|
||||
|
||||
Reference in New Issue
Block a user