.. _program_listing_file_src_navtk_utils_GriddedInterpolant.hpp: Program Listing for File GriddedInterpolant.hpp =============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/navtk/utils/GriddedInterpolant.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include namespace navtk { namespace utils { class GriddedInterpolant { private: struct Denominator { int idx; int p2; int m1; }; public: GriddedInterpolant(Vector x_vector, Vector y_vector, Matrix q_mat); double interpolate(double x, double y); private: GriddedInterpolant::Denominator get_3_point_denominators(int idx, const Vector& vec) const; Matrix big_f(const Denominator& x, const Denominator& y); private: Vector x_vec; Vector y_vec; Matrix q; std::size_t num_x_elem; std::size_t num_y_elem; double x_spacing; double y_spacing; double x_width; double y_width; double x_max; double x_min; double y_max; double y_min; const Matrix A = Matrix{{1, 0, 0, 0}, {0, 0, 1, 0}, {-3, 3, -2, -1}, {2, -2, 1, 1}}; }; } // namespace utils } // namespace navtk