added new tex comments/details

worked on evaluation
stair sanitizing
added stair-plotting (for debug)
This commit is contained in:
2016-02-06 15:06:47 +01:00
parent 716b004f3c
commit 004d1f48fd
11 changed files with 452 additions and 107 deletions

View File

@@ -21,6 +21,7 @@ public:
K::GnuplotSplotElementLines floors;
K::GnuplotSplotElementColorPoints nodes;
K::GnuplotSplotElementLines edges;
public:
@@ -28,9 +29,13 @@ public:
floors.setLineWidth(2);
plot.add(&edges);
plot.add(&nodes);
plot.add(&floors);
nodes.setPointSize(0.7);
edges.setColorHex("#555555");
gp << "set ticslevel 0\n";
@@ -89,6 +94,40 @@ public:
}
/** show all nodes (and edges?) within the given region */
template <typename T> void debugGrid(Grid<T>& grid, const BBox3& bbox, const bool addNodes, const bool addEdges) {
std::set<uint64_t> used;
for (T& n1 : grid) {
if (bbox.contains(n1)) {
const K::GnuplotPoint3 p1(n1.x_cm, n1.y_cm, n1.z_cm);
if (addNodes) {
nodes.add(p1, 0);
}
if (addEdges) {
for (const T& n2 : grid.neighbors(n1)) {
if (n1.z_cm == n2.z_cm) {continue;} // speedup
if (used.find(n2.getIdx()) == used.end()) {
const K::GnuplotPoint3 p2(n2.x_cm, n2.y_cm, n2.z_cm);
edges.addSegment(p1, p2);
}
}
used.insert(n1.getIdx());
// for (const T& n2 : grid.neighbors(n1)) {
// const uint64_t idx = n1.getIdx() * n2.getIdx();
// if (used.find(idx) == used.end()) {
// const K::GnuplotPoint3 p2(n2.x_cm, n2.y_cm, n2.z_cm);
// edges.addSegment(p1, p2);
// used.insert(idx);
// }
// }
}
}
}
}
};