debug.hpp 595 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef DEBUG_HPP
  2. #define DEBUG_HPP
  3. //#define MYDEBUG
  4. #include <iostream>
  5. using namespace std;
  6. class Debug{
  7. public:
  8. static const int level=2;
  9. static const size_t ix=55;
  10. static void display(string name,double* u,size_t start,size_t end);
  11. static void pause();
  12. static bool debug_Thomas;
  13. };
  14. inline void Debug::display(string name,double* u,size_t start,size_t end){
  15. cout<<"===== "<<name<<" ====="<<endl;
  16. for(size_t i=start;i<end;++i){
  17. cout<<i<<" : "<<u[i]<<endl;
  18. }
  19. cout<<"============================"<<endl;
  20. }
  21. inline void Debug::pause(){
  22. char a;
  23. cin>>a;
  24. }
  25. #endif