fitpack
Modern Fortran library for curve and surface fitting with splines
Loading...
Searching...
No Matches
fpGridSurface.hpp
Go to the documentation of this file.
1/***************************************************************************************************
2! ____________________ ___ ________ __
3! / ____/ _/_ __/ __ \/ | / ____/ //_/
4! / /_ / / / / / /_/ / /| |/ / / ,<
5! / __/ _/ / / / / ____/ ___ / /___/ /| |
6! /_/ /___/ /_/ /_/ /_/ |_\____/_/ |_|
7!
8! A Curve Fitting Package
9!
10! fpGridSurface.hpp (class fpGridSurface)
11!> @brief Standalone C++ wrapper for fitpack_grid_surface (no fortran-arrays dependency)
12!
13! @author Federico Perini
14! @date 2026-08-27
15!
16! References :
17! - C. De Boor, "On calculating with b-splines", J Approx Theory 6 (1972) 50-62
18! - M. G. Cox, "The numerical evaluation of b-splines", J Inst Maths Applics 10 (1972) 134-149
19! - P. Dierckx, "Curve and surface fitting with splines", Monographs on numerical analysis,
20! Oxford university press, 1993.
21!
22! **************************************************************************************************/
23
24#ifndef FPGRIDSURFACE_HPP_INCLUDED
25#define FPGRIDSURFACE_HPP_INCLUDED
26
27#include "fitpack_config.h"
28
29#if HAVE_FXARRAY
30#include "fxArrays.hpp"
31#endif
32
33#include "fitpack_grid_surface_c.h"
34#include "fpFitter.hpp"
35#include "fpCurve.hpp"
36#include <string>
37#include <vector>
38#include <cstdint>
39#include <memory>
40#include <stdexcept>
41#include <variant>
42#include <optional>
43#include <array>
44
45static_assert(sizeof(fitpack_grid_surface_c) == sizeof(fitpack_fitter_c),
46 "C descriptor layout mismatch: fitpack_grid_surface_c vs fitpack_fitter_c");
47
56class fpGridSurface : public fpFitter {
57public:
58 // ===========================================================================================
59 // Constructors and Destructor
60 // ===========================================================================================
61
66 fitpack_grid_surface_c_allocate(as<fitpack_grid_surface_c>(), nullptr);
67 }
68
72 ~fpGridSurface() override {
73 fitpack_grid_surface_c_destroy(as<fitpack_grid_surface_c>(), nullptr);
74 }
75
80 *as<fitpack_grid_surface_c>() = fitpack_grid_surface_c_null;
81 fitpack_grid_surface_c_copy(as<fitpack_grid_surface_c>(), other.as<fitpack_grid_surface_c>(), false, nullptr);
82 }
83
88 if (this != &other) {
89 fitpack_grid_surface_c_destroy(as<fitpack_grid_surface_c>(), nullptr);
90 fitpack_grid_surface_c_copy(as<fitpack_grid_surface_c>(), other.as<fitpack_grid_surface_c>(), false, nullptr);
91 }
92 return *this;
93 }
94
99 *as<fitpack_grid_surface_c>() = fitpack_grid_surface_c_null;
100 fitpack_grid_surface_c_move_alloc(as<fitpack_grid_surface_c>(), other.as<fitpack_grid_surface_c>(), nullptr);
101 }
102
107 if (this != &other) {
108 fitpack_grid_surface_c_destroy(as<fitpack_grid_surface_c>(), nullptr);
109 fitpack_grid_surface_c_move_alloc(as<fitpack_grid_surface_c>(), other.as<fitpack_grid_surface_c>(), nullptr);
110 }
111 return *this;
112 }
113
117 explicit fpGridSurface(fitpack_grid_surface_c& c_wrapper, bool move = false) : fpFitter(NoAlloc{}) {
118 if (move) {
119 fitpack_grid_surface_c_move_alloc(as<fitpack_grid_surface_c>(), &c_wrapper, nullptr);
120 } else {
121 *as<fitpack_grid_surface_c>() = fitpack_grid_surface_c_null;
122 fitpack_grid_surface_c_copy(as<fitpack_grid_surface_c>(), &c_wrapper, false, nullptr);
123 }
124 }
125
131 explicit fpGridSurface(fitpack_grid_surface_c& c_wrapper, ViewTag) : fpFitter(NoAlloc{}) {
132 *as<fitpack_grid_surface_c>() = c_wrapper;
133 as<fitpack_grid_surface_c>()->is_pointer = true;
134 }
135
136 // ===========================================================================================
137 // Utility Methods
138 // ===========================================================================================
139
143 bool is_allocated() const override {
144 return as<fitpack_grid_surface_c>()->cptr != nullptr;
145 }
146
150 bool is_pointer() const override {
151 return as<fitpack_grid_surface_c>()->is_pointer;
152 }
153
157 const char* c_type_name() const override {
158 return fitpack_grid_surface_c_c_type_name(*as<fitpack_grid_surface_c>());
159 }
160
165 const char* cpp_type_name() const override {
166 return "fpGridSurface";
167 }
168
172 fitpack_grid_surface_c& c_handle() {
174 }
175
179 const fitpack_grid_surface_c& c_handle() const {
181 }
182
192 return fpGridSurface(NoAlloc{});
193 }
194
199 return static_cast<fpFitter&>(*this);
200 }
201 const fpFitter& as_parent() const {
202 return static_cast<const fpFitter&>(*this);
203 }
204
205 // ===========================================================================================
206 // Method Wrappers (standalone — no fxArray dependency)
207 // ===========================================================================================
208
212 virtual void new_points(std::vector<double>& x, std::vector<double>& y, int32_t z_n1, int32_t z_n2, std::vector<double>& z) {
213 int32_t n = static_cast<int32_t>(x.size());
214 fitpack_grid_surface_c_new_points(as<fitpack_grid_surface_c>(), n, x.data(), y.data(), z_n1, z_n2, z.data());
215 }
216
217
221 virtual int32_t new_fit(std::vector<double>& x, std::vector<double>& y, int32_t z_n1, int32_t z_n2, std::vector<double>& z, double* smoothing = nullptr, int32_t* order = nullptr) {
222 int32_t n = static_cast<int32_t>(x.size());
223 return fitpack_grid_surface_c_new_fit(as<fitpack_grid_surface_c>(), n, x.data(), y.data(), z_n1, z_n2, z.data(), smoothing, order);
224 }
225
226
227 virtual int32_t fit(double* smoothing = nullptr, int32_t* order = nullptr, bool* keep_knots = nullptr) {
228 return fitpack_grid_surface_c_fit(as<fitpack_grid_surface_c>(), smoothing, order, keep_knots);
229 }
230
231 virtual int32_t least_squares(double* smoothing = nullptr, bool* reset_knots = nullptr) {
232 return fitpack_grid_surface_c_least_squares(as<fitpack_grid_surface_c>(), smoothing, reset_knots);
233 }
234
235 virtual int32_t interpolate(bool* reset_knots = nullptr) {
236 return fitpack_grid_surface_c_interpolate(as<fitpack_grid_surface_c>(), reset_knots);
237 }
238
239 virtual double eval(double x, double y, int32_t* ierr = nullptr) {
240 return fitpack_grid_surface_c_gridsurf_eval_one(as<fitpack_grid_surface_c>(), x, y, ierr);
241 }
242
246 virtual std::vector<double> eval(std::vector<double>& x, std::vector<double>& y, int32_t* ierr = nullptr) {
247 int32_t n = static_cast<int32_t>(x.size());
248 std::vector<double> result(n);
249 int32_t n_result = 0;
250 fitpack_grid_surface_c_gridsurf_eval_many(as<fitpack_grid_surface_c>(), n, x.data(), y.data(), ierr, result.data(), &n_result, n);
251 result.resize(n_result);
252 return result;
253 }
254
255
256 virtual double eval_ongrid(double x, double y, int32_t* ierr = nullptr) {
257 return fitpack_grid_surface_c_gridded_eval_one(as<fitpack_grid_surface_c>(), x, y, ierr);
258 }
259
263 virtual std::vector<double> eval_ongrid(std::vector<double>& x, std::vector<double>& y, int32_t* ierr = nullptr) {
264 int32_t n = static_cast<int32_t>(x.size());
265 std::vector<double> result(n * n);
266 int32_t n_result = 0;
267 fitpack_grid_surface_c_gridded_eval_many(as<fitpack_grid_surface_c>(), n, x.data(), y.data(), ierr, result.data(), &n_result, n * n);
268 result.resize(n_result);
269 return result;
270 }
271
272
273 virtual double dfdx(double x, double y, int32_t dx, int32_t dy, int32_t* ierr = nullptr) {
274 return fitpack_grid_surface_c_gridded_derivatives_one(as<fitpack_grid_surface_c>(), x, y, dx, dy, ierr);
275 }
276
280 virtual std::vector<double> dfdx(std::vector<double>& x, std::vector<double>& y, int32_t dx, int32_t dy, int32_t* ierr = nullptr) {
281 int32_t n = static_cast<int32_t>(x.size());
282 std::vector<double> result(n);
283 int32_t n_result = 0;
284 fitpack_grid_surface_c_gridded_derivatives_many(as<fitpack_grid_surface_c>(), n, x.data(), y.data(), dx, dy, ierr, result.data(), &n_result, n);
285 result.resize(n_result);
286 return result;
287 }
288
289
293 virtual std::vector<double> dfdx_ongrid(std::vector<double>& x, std::vector<double>& y, int32_t dx, int32_t dy, int32_t* ierr = nullptr) {
294 int32_t n = static_cast<int32_t>(x.size());
295 std::vector<double> result(n * n);
296 int32_t n_result = 0;
297 fitpack_grid_surface_c_gridded_derivatives_gridded(as<fitpack_grid_surface_c>(), n, x.data(), y.data(), dx, dy, ierr, result.data(), &n_result, n * n);
298 result.resize(n_result);
299 return result;
300 }
301
302
306 virtual double integral(std::vector<double>& lower, std::vector<double>& upper) const {
307 int32_t n = static_cast<int32_t>(lower.size());
308 return fitpack_grid_surface_c_integral(as<fitpack_grid_surface_c>(), n, lower.data(), upper.data());
309 }
310
311
312 virtual fpCurve cross_section(double u, bool along_y, int32_t* ierr = nullptr) {
313 fitpack_curve_c result_c;
314 fitpack_grid_surface_c_cross_section(as<fitpack_grid_surface_c>(), u, along_y, ierr, &result_c);
315 return fpCurve(result_c, true);
316 }
317
318 virtual fpGridSurface derivative_spline(int32_t nux, int32_t nuy, int32_t* ierr = nullptr) {
319 fitpack_grid_surface_c result_c;
320 fitpack_grid_surface_c_derivative_spline(as<fitpack_grid_surface_c>(), nux, nuy, ierr, &result_c);
321 return fpGridSurface(result_c, true);
322 }
323
324 int32_t comm_size() const override {
325 return fitpack_grid_surface_c_comm_size(as<fitpack_grid_surface_c>());
326 }
327
331 void comm_pack(std::vector<double>& buffer) const override {
332 int32_t n = static_cast<int32_t>(buffer.size());
333 fitpack_grid_surface_c_comm_pack(as<fitpack_grid_surface_c>(), n, buffer.data());
334 }
335
336
340 void comm_expand(std::vector<double>& buffer) override {
341 int32_t n = static_cast<int32_t>(buffer.size());
342 fitpack_grid_surface_c_comm_expand(as<fitpack_grid_surface_c>(), n, buffer.data());
343 }
344
345
346 double mse() const override {
347 return fitpack_grid_surface_c_mse(as<fitpack_grid_surface_c>());
348 }
349
350 int32_t core_comm_size() const override {
351 return fitpack_grid_surface_c_core_comm_size(as<fitpack_grid_surface_c>());
352 }
353
357 void core_comm_pack(std::vector<double>& buffer) const override {
358 int32_t n = static_cast<int32_t>(buffer.size());
359 fitpack_grid_surface_c_core_comm_pack(as<fitpack_grid_surface_c>(), n, buffer.data());
360 }
361
362
366 void core_comm_expand(std::vector<double>& buffer) override {
367 int32_t n = static_cast<int32_t>(buffer.size());
368 fitpack_grid_surface_c_core_comm_expand(as<fitpack_grid_surface_c>(), n, buffer.data());
369 }
370
371
372 void destroy_base() override {
373 fitpack_grid_surface_c_destroy_base(as<fitpack_grid_surface_c>());
374 }
375
376 // ===========================================================================================
377 // Component Array Accessors
378 // ===========================================================================================
379
384 std::vector<double> x_vector() const {
385 double* raw = nullptr;
386 int64_t extents[1] = {0};
387 fitpack_grid_surface_c_getcomp_x(as<fitpack_grid_surface_c>(), &raw, extents);
388 const int64_t total = extents[0];
389 if (raw == nullptr || total <= 0) return {};
390 const double* first = reinterpret_cast<const double*>(raw);
391 return std::vector<double>(first, first + total);
392 }
393
394#if HAVE_FXARRAY
407 fxArray<double> x() const {
408 double* raw = nullptr;
409 int64_t extents[1] = {0};
410 fitpack_grid_surface_c_getcomp_x(as<fitpack_grid_surface_c>(), &raw, extents);
411 FX_SIZE bounds[2]; // (lower, upper) per dimension, Fortran lbound 1
412 for (int k = 0; k < 1; ++k) {
413 bounds[2 * k] = 1;
414 bounds[2 * k + 1] = static_cast<FX_SIZE>(extents[k]);
415 }
416 array_c descr = array_c_null;
417 array_c_from_ptr(&descr, "x", static_cast<void*>(raw),
418 getCFITypeFlag<double>(),
419 static_cast<FX_SIZE>(sizeof(double)),
420 static_cast<FX_RANK>(1), bounds);
421 return fxArray<double>(descr);
422 }
423#endif // HAVE_FXARRAY
424
429 std::vector<double> y_vector() const {
430 double* raw = nullptr;
431 int64_t extents[1] = {0};
432 fitpack_grid_surface_c_getcomp_y(as<fitpack_grid_surface_c>(), &raw, extents);
433 const int64_t total = extents[0];
434 if (raw == nullptr || total <= 0) return {};
435 const double* first = reinterpret_cast<const double*>(raw);
436 return std::vector<double>(first, first + total);
437 }
438
439#if HAVE_FXARRAY
452 fxArray<double> y() const {
453 double* raw = nullptr;
454 int64_t extents[1] = {0};
455 fitpack_grid_surface_c_getcomp_y(as<fitpack_grid_surface_c>(), &raw, extents);
456 FX_SIZE bounds[2]; // (lower, upper) per dimension, Fortran lbound 1
457 for (int k = 0; k < 1; ++k) {
458 bounds[2 * k] = 1;
459 bounds[2 * k + 1] = static_cast<FX_SIZE>(extents[k]);
460 }
461 array_c descr = array_c_null;
462 array_c_from_ptr(&descr, "y", static_cast<void*>(raw),
463 getCFITypeFlag<double>(),
464 static_cast<FX_SIZE>(sizeof(double)),
465 static_cast<FX_RANK>(1), bounds);
466 return fxArray<double>(descr);
467 }
468#endif // HAVE_FXARRAY
469
478 std::vector<double> z_vector() const {
479 double* raw = nullptr;
480 int64_t extents[2] = {0, 0};
481 fitpack_grid_surface_c_getcomp_z(as<fitpack_grid_surface_c>(), &raw, extents);
482 const int64_t total = extents[0] * extents[1];
483 if (raw == nullptr || total <= 0) return {};
484 const double* first = reinterpret_cast<const double*>(raw);
485 return std::vector<double>(first, first + total);
486 }
487
492 std::array<int64_t, 2> z_shape() const {
493 double* raw = nullptr;
494 int64_t extents[2] = {0, 0};
495 fitpack_grid_surface_c_getcomp_z(as<fitpack_grid_surface_c>(), &raw, extents);
496 return { extents[0], extents[1] };
497 }
498
499#if HAVE_FXARRAY
512 fxArray<double> z() const {
513 double* raw = nullptr;
514 int64_t extents[2] = {0, 0};
515 fitpack_grid_surface_c_getcomp_z(as<fitpack_grid_surface_c>(), &raw, extents);
516 FX_SIZE bounds[4]; // (lower, upper) per dimension, Fortran lbound 1
517 for (int k = 0; k < 2; ++k) {
518 bounds[2 * k] = 1;
519 bounds[2 * k + 1] = static_cast<FX_SIZE>(extents[k]);
520 }
521 array_c descr = array_c_null;
522 array_c_from_ptr(&descr, "z", static_cast<void*>(raw),
523 getCFITypeFlag<double>(),
524 static_cast<FX_SIZE>(sizeof(double)),
525 static_cast<FX_RANK>(2), bounds);
526 return fxArray<double>(descr);
527 }
528#endif // HAVE_FXARRAY
529
538 std::vector<double> t_vector() const {
539 double* raw = nullptr;
540 int64_t extents[2] = {0, 0};
541 fitpack_grid_surface_c_getcomp_t(as<fitpack_grid_surface_c>(), &raw, extents);
542 const int64_t total = extents[0] * extents[1];
543 if (raw == nullptr || total <= 0) return {};
544 const double* first = reinterpret_cast<const double*>(raw);
545 return std::vector<double>(first, first + total);
546 }
547
552 std::array<int64_t, 2> t_shape() const {
553 double* raw = nullptr;
554 int64_t extents[2] = {0, 0};
555 fitpack_grid_surface_c_getcomp_t(as<fitpack_grid_surface_c>(), &raw, extents);
556 return { extents[0], extents[1] };
557 }
558
559#if HAVE_FXARRAY
572 fxArray<double> t() const {
573 double* raw = nullptr;
574 int64_t extents[2] = {0, 0};
575 fitpack_grid_surface_c_getcomp_t(as<fitpack_grid_surface_c>(), &raw, extents);
576 FX_SIZE bounds[4]; // (lower, upper) per dimension, Fortran lbound 1
577 for (int k = 0; k < 2; ++k) {
578 bounds[2 * k] = 1;
579 bounds[2 * k + 1] = static_cast<FX_SIZE>(extents[k]);
580 }
581 array_c descr = array_c_null;
582 array_c_from_ptr(&descr, "t", static_cast<void*>(raw),
583 getCFITypeFlag<double>(),
584 static_cast<FX_SIZE>(sizeof(double)),
585 static_cast<FX_RANK>(2), bounds);
586 return fxArray<double>(descr);
587 }
588#endif // HAVE_FXARRAY
589
590 // ===========================================================================================
591 // Scalar Property Accessors
592 // ===========================================================================================
593
594 int32_t& nmax() {
595 return *fitpack_grid_surface_c_ref_nmax(as<fitpack_grid_surface_c>());
596 }
597 const int32_t& nmax() const {
598 return *fitpack_grid_surface_c_ref_nmax(as<fitpack_grid_surface_c>());
599 }
600
601protected:
602 explicit fpGridSurface(NoAlloc tag) : fpFitter(tag) {}
603
604};
605
606#endif /* FPGRIDSURFACE_HPP_INCLUDED */
Standalone C++ RAII wrapper for Fortran fitpack_curve.
Definition fpCurve.hpp:56
double & smoothing()
Definition fpFitter.hpp:317
fpFitter(NoAlloc)
Protected constructor for derived classes (does not allocate)
Definition fpFitter.hpp:354
T * as()
Definition fpFitter.hpp:360
fxArray< double > z() const
Zero-copy fxArray view of component 'z'.
Definition fpGridSurface.hpp:512
bool is_allocated() const override
Check if object is allocated.
Definition fpGridSurface.hpp:143
void comm_pack(std::vector< double > &buffer) const override
comm_pack
Definition fpGridSurface.hpp:331
virtual std::vector< double > dfdx(std::vector< double > &x, std::vector< double > &y, int32_t dx, int32_t dy, int32_t *ierr=nullptr)
dfdx
Definition fpGridSurface.hpp:280
virtual void new_points(std::vector< double > &x, std::vector< double > &y, int32_t z_n1, int32_t z_n2, std::vector< double > &z)
new_points
Definition fpGridSurface.hpp:212
fxArray< double > x() const
Zero-copy fxArray view of component 'x'.
Definition fpGridSurface.hpp:407
const fitpack_grid_surface_c & c_handle() const
Get underlying C wrapper (const, for interop)
Definition fpGridSurface.hpp:179
double mse() const override
Definition fpGridSurface.hpp:346
fpGridSurface(const fpGridSurface &other)
Copy constructor - deep copy.
Definition fpGridSurface.hpp:79
virtual std::vector< double > eval_ongrid(std::vector< double > &x, std::vector< double > &y, int32_t *ierr=nullptr)
eval_ongrid
Definition fpGridSurface.hpp:263
fxArray< double > y() const
Zero-copy fxArray view of component 'y'.
Definition fpGridSurface.hpp:452
std::vector< double > t_vector() const
Deep copy of component 't' as a std::vector.
Definition fpGridSurface.hpp:538
int32_t comm_size() const override
Definition fpGridSurface.hpp:324
int32_t & nmax()
Definition fpGridSurface.hpp:594
virtual std::vector< double > dfdx_ongrid(std::vector< double > &x, std::vector< double > &y, int32_t dx, int32_t dy, int32_t *ierr=nullptr)
dfdx_ongrid
Definition fpGridSurface.hpp:293
virtual double eval(double x, double y, int32_t *ierr=nullptr)
Definition fpGridSurface.hpp:239
std::array< int64_t, 2 > z_shape() const
Extents of component 'z', leading dimension first.
Definition fpGridSurface.hpp:492
const int32_t & nmax() const
Definition fpGridSurface.hpp:597
virtual double dfdx(double x, double y, int32_t dx, int32_t dy, int32_t *ierr=nullptr)
Definition fpGridSurface.hpp:273
bool is_pointer() const override
Check if this is a non-owning pointer.
Definition fpGridSurface.hpp:150
fpFitter & as_parent()
Upcast to parent type (reference, no copy)
Definition fpGridSurface.hpp:198
fpGridSurface(fpGridSurface &&other) noexcept
Move constructor - transfer ownership.
Definition fpGridSurface.hpp:98
fpGridSurface(NoAlloc tag)
Definition fpGridSurface.hpp:602
std::vector< double > y_vector() const
Deep copy of component 'y' as a std::vector.
Definition fpGridSurface.hpp:429
virtual int32_t least_squares(double *smoothing=nullptr, bool *reset_knots=nullptr)
Definition fpGridSurface.hpp:231
std::vector< double > z_vector() const
Deep copy of component 'z' as a std::vector.
Definition fpGridSurface.hpp:478
void core_comm_pack(std::vector< double > &buffer) const override
core_comm_pack
Definition fpGridSurface.hpp:357
static fpGridSurface make_view()
Construct an empty (non-owning) wrapper, for use as a view target.
Definition fpGridSurface.hpp:191
virtual double integral(std::vector< double > &lower, std::vector< double > &upper) const
integral
Definition fpGridSurface.hpp:306
void comm_expand(std::vector< double > &buffer) override
comm_expand
Definition fpGridSurface.hpp:340
void destroy_base() override
Definition fpGridSurface.hpp:372
fpGridSurface(fitpack_grid_surface_c &c_wrapper, bool move=false)
Construct from existing C wrapper (takes ownership if move=true)
Definition fpGridSurface.hpp:117
virtual double eval_ongrid(double x, double y, int32_t *ierr=nullptr)
Definition fpGridSurface.hpp:256
virtual fpCurve cross_section(double u, bool along_y, int32_t *ierr=nullptr)
Definition fpGridSurface.hpp:312
fpGridSurface()
Default constructor - allocates new fitpack_grid_surface.
Definition fpGridSurface.hpp:65
const char * cpp_type_name() const override
Return the fully-qualified C++ class name for this class. Owned by the C++ layer — does not round-tri...
Definition fpGridSurface.hpp:165
std::vector< double > x_vector() const
Deep copy of component 'x' as a std::vector.
Definition fpGridSurface.hpp:384
int32_t core_comm_size() const override
Definition fpGridSurface.hpp:350
virtual int32_t interpolate(bool *reset_knots=nullptr)
Definition fpGridSurface.hpp:235
fpGridSurface & operator=(const fpGridSurface &other)
Copy assignment - deep copy.
Definition fpGridSurface.hpp:87
const fpFitter & as_parent() const
Definition fpGridSurface.hpp:201
virtual int32_t fit(double *smoothing=nullptr, int32_t *order=nullptr, bool *keep_knots=nullptr)
Definition fpGridSurface.hpp:227
fpGridSurface(fitpack_grid_surface_c &c_wrapper, ViewTag)
Non-owning view ctor: bit-copy the C handle, mark is_pointer=true. Used by parent classes' polymorphi...
Definition fpGridSurface.hpp:131
fxArray< double > t() const
Zero-copy fxArray view of component 't'.
Definition fpGridSurface.hpp:572
fitpack_grid_surface_c & c_handle()
Get underlying C wrapper (for interop)
Definition fpGridSurface.hpp:172
~fpGridSurface() override
Destructor - deallocates if owned.
Definition fpGridSurface.hpp:72
std::array< int64_t, 2 > t_shape() const
Extents of component 't', leading dimension first.
Definition fpGridSurface.hpp:552
virtual fpGridSurface derivative_spline(int32_t nux, int32_t nuy, int32_t *ierr=nullptr)
Definition fpGridSurface.hpp:318
virtual std::vector< double > eval(std::vector< double > &x, std::vector< double > &y, int32_t *ierr=nullptr)
eval
Definition fpGridSurface.hpp:246
virtual int32_t new_fit(std::vector< double > &x, std::vector< double > &y, int32_t z_n1, int32_t z_n2, std::vector< double > &z, double *smoothing=nullptr, int32_t *order=nullptr)
new_fit
Definition fpGridSurface.hpp:221
fpGridSurface & operator=(fpGridSurface &&other) noexcept
Move assignment - transfer ownership.
Definition fpGridSurface.hpp:106
void core_comm_expand(std::vector< double > &buffer) override
core_comm_expand
Definition fpGridSurface.hpp:366
const char * c_type_name() const override
Return the C wrapper struct name for this class (e.g. "fitpack_grid_surface_c").
Definition fpGridSurface.hpp:157
Tag type for derived class constructors (no allocation)
Definition fpFitter.hpp:349
Tag type for non-owning view constructors of polymorphic concrete subtypes. Declared on roots and abs...
Definition fpFitter.hpp:103