1#ifndef COOLPROP_REGION_CUBIC_SPLINE_CURVE_H
2#define COOLPROP_REGION_CUBIC_SPLINE_CURVE_H
47 static std::unique_ptr<CubicSplineCurve>
build(std::vector<double> a, std::vector<double> b);
55 std::vector<double>
a;
56 std::vector<double>
b;
57 std::vector<double>
M;
69 [[nodiscard]]
double eval(
double a)
const noexcept override;
70 [[nodiscard]]
double eval_da(
double a)
const noexcept override;
71 [[nodiscard]] std::pair<double, double>
bounds() const noexcept override;
72 [[nodiscard]] std::pair<
double,
double>
a_range() const noexcept override;
75 CubicSplineCurve(std::vector<
double> a, std::vector<
double> b, std::vector<
double> M,
double b_min,
double b_max);
83 [[nodiscard]] std::
size_t locate(
double a) const noexcept;
88 void build_bucket_table_() noexcept;
90 std::vector<
double> a_;
91 std::vector<
double> b_;
92 std::vector<
double> M_;
106 static constexpr std::
size_t kBuckets = 256;
107 double a_lo_inv_step_ = 0.0;
108 std::array<std::uint16_t, kBuckets> bucket_to_knot_{};