dataset.hpp 722 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef DATASET_HPP
  2. #define DATASET_HPP
  3. #include <cstddef>
  4. #include "vector.hpp"
  5. using namespace std;
  6. class Dataset{
  7. protected:
  8. size_t train_size;
  9. size_t test_size;
  10. size_t x_size;
  11. size_t y_size;
  12. public:
  13. Dataset();
  14. size_t get_train_size() const;
  15. size_t get_test_size() const;
  16. size_t get_y_size() const;
  17. virtual pair<const Vector&,const Vector&> get_train(const size_t i) const=0;
  18. virtual pair<const Vector&,const Vector&> get_test(const size_t i) const=0;
  19. };
  20. inline
  21. Dataset::Dataset(){
  22. }
  23. inline size_t
  24. Dataset::get_train_size() const{
  25. return train_size;
  26. }
  27. inline size_t
  28. Dataset::get_test_size() const{
  29. return test_size;
  30. }
  31. inline size_t
  32. Dataset::get_y_size() const{
  33. return y_size;
  34. }
  35. #endif