removed gridSize from the template arguments

- not needed and code much cleaner
some minor changes
new test-cases
This commit is contained in:
2016-01-25 15:53:12 +01:00
parent 9947dced15
commit 5aedce47f1
16 changed files with 167 additions and 66 deletions

View File

@@ -13,13 +13,13 @@
TEST(TestAll, Nav) {
Grid<20, GP> g;
Grid<GP> g(20);
// dijkstra mapper
class TMP {
Grid<20, GP>& grid;
Grid<GP>& grid;
public:
TMP(Grid<20, 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 {
@@ -29,7 +29,7 @@ TEST(TestAll, Nav) {
}
} tmp(g);
GridFactory<20, GP> gf(g);
GridFactory<GP> gf(g);
// load floorplan
FloorplanFactorySVG fpf(getDataFile("fp1.svg"), 6);