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

@@ -51,13 +51,13 @@ public:
}
template <int gridSize_cm, typename T> Plot& showGrid(Grid<gridSize_cm, T>& g) {
template <typename T> Plot& showGrid(Grid<T>& g) {
addEdges(g);
addNodes(g);
return *this;
}
template <int gridSize_cm, typename T> Plot& addEdges(Grid<gridSize_cm, T>& g) {
template <typename T> Plot& addEdges(Grid<T>& g) {
// prevent adding edges twice
std::set<size_t> done;
@@ -78,7 +78,7 @@ public:
}
template <int gridSize_cm, typename T> Plot& addNodes(Grid<gridSize_cm, T>& g) {
template <typename T> Plot& addNodes(Grid<T>& g) {
for (GP& n1 : g) {
K::GnuplotPoint3 p1(n1.x_cm, n1.y_cm, n1.z_cm);
@@ -89,7 +89,7 @@ public:
}
template <int gridSize_cm, typename T> Plot& build(Grid<gridSize_cm, T>& g) {
template <typename T> Plot& build(Grid<T>& g) {
std::set<uint64_t> done;