Advertisement
theultraman20

alg.hpp FULL

Oct 8th, 2024
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1.  
  2. #pragma once
  3.  
  4. #include "cube.hpp"
  5. #include <ostream>
  6. #include <fstream>
  7. #include <vector>
  8. #include <utility>
  9. #include <string>
  10.  
  11. template<typename T> class PDB {
  12. //only public for debugging
  13. public:
  14.     std::vector<uint8_t> const data;
  15.  
  16.     static std::vector<uint8_t> genPdb(T start, int const permuts);
  17.     //static PDB<T> deserialize(std::string filename);
  18.     void serialize(std::string filename);
  19.     //PDB(std::vector<uint8_t> data) : data{data} {};
  20.  
  21.     friend std::ostream& operator<<(std::ofstream os, PDB<T> const& pdb);
  22.  
  23. //public:
  24.     PDB(T start, int const permuts) : data{genPdb(start, permuts)} {};
  25.     //good enough lol
  26.     PDB(std::string filename);
  27.     uint8_t getDist(int idx) const;
  28.  
  29. };
  30.  
  31. std::pair<std::vector<Cube>, uint64_t> idaStar(Cube start);
  32.  
  33. //template<typename T> std::ostream& operator<<(std::ofstream os, PDB<T> const& pdb);
  34.  
  35. #include "alg_impl.hpp"
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement