added new test-cases added flexible dijkstra calculation added debugging log modified: plotting, grid-generation, grid-importance, refactoring
31 lines
531 B
C++
31 lines
531 B
C++
#ifndef DEBUG_H
|
|
#define DEBUG_H
|
|
|
|
#include <string>
|
|
#include <iostream>
|
|
#include <iomanip>
|
|
|
|
class Log {
|
|
|
|
public:
|
|
|
|
static void add(const char* comp, const std::string what) {
|
|
addComp(comp);
|
|
std::cout << what << std::endl;
|
|
}
|
|
|
|
static void add(const std::string& component, const std::string what) {
|
|
addComp(component.c_str());
|
|
std::cout << what << std::endl;
|
|
}
|
|
|
|
private:
|
|
|
|
static void addComp(const char* component) {
|
|
std::cout << "[" << std::setw(12) << std::setfill(' ') << component << "] ";
|
|
}
|
|
|
|
};
|
|
|
|
#endif // DEBUG_H
|