Utils.hpp 590 B

123456789101112131415161718
  1. #ifndef UTILS__HPP
  2. #define UTILS_HPP
  3. #include <Eigen/Core>
  4. class Utils
  5. {
  6. public:
  7. static float* interp(const float* x, const unsigned int tx, const Eigen::RowVectorXf& xd, const Eigen::RowVectorXf& yd);
  8. static float interp(float x, float xd1, float yd1, float xd2, float yd2);
  9. static unsigned int search(float to_search, const Eigen::RowVectorXf& data);
  10. static unsigned int search(float to_search, const float* data, unsigned int first, unsigned int last);
  11. static float* NPlinearWeightMask(float* x, unsigned int length, float xMin, float xMax, float xTolerance);
  12. };
  13. #endif