|
fitpack
Modern Fortran library for curve and surface fitting with splines
|
Standalone C++ RAII wrapper for Fortran fitpack_sphere. More...
#include <fpSphere.hpp>


Public Member Functions | |
| fpSphere () | |
| Default constructor - allocates new fitpack_sphere. | |
| ~fpSphere () override | |
| Destructor - deallocates if owned. | |
| fpSphere (const fpSphere &other) | |
| Copy constructor - deep copy. | |
| fpSphere & | operator= (const fpSphere &other) |
| Copy assignment - deep copy. | |
| fpSphere (fpSphere &&other) noexcept | |
| Move constructor - transfer ownership. | |
| fpSphere & | operator= (fpSphere &&other) noexcept |
| Move assignment - transfer ownership. | |
| fpSphere (fitpack_sphere_c &c_wrapper, bool move=false) | |
| Construct from existing C wrapper (takes ownership if move=true) | |
| fpSphere (fitpack_sphere_c &c_wrapper, ViewTag) | |
| Non-owning view ctor: bit-copy the C handle, mark is_pointer=true. Used by parent classes' polymorphic accessors to wrap a base-class handle as the correct concrete subtype. | |
| bool | is_allocated () const override |
| Check if object is allocated. | |
| bool | is_pointer () const override |
| Check if this is a non-owning pointer. | |
| const char * | c_type_name () const override |
| Return the C wrapper struct name for this class (e.g. "fitpack_sphere_c"). | |
| 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-trip through Fortran. | |
| fitpack_sphere_c & | c_handle () |
| Get underlying C wrapper (for interop) | |
| const fitpack_sphere_c & | c_handle () const |
| Get underlying C wrapper (const, for interop) | |
| fpFitter & | as_parent () |
| Upcast to parent type (reference, no copy) | |
| const fpFitter & | as_parent () const |
| virtual void | new_points (std::vector< double > &theta, std::vector< double > &phi, std::vector< double > &r, double *w=nullptr) |
| new_points | |
| virtual int32_t | new_fit (std::vector< double > &theta, std::vector< double > &phi, std::vector< double > &r, double *w=nullptr, double *smoothing=nullptr) |
| new_fit | |
| virtual int32_t | fit (double *smoothing=nullptr, bool *keep_knots=nullptr) |
| virtual int32_t | least_squares (double *smoothing=nullptr, bool *reset_knots=nullptr) |
| virtual int32_t | interpolate (bool *reset_knots=nullptr) |
| virtual double | eval (double theta, double phi, int32_t *ierr=nullptr) |
| virtual std::vector< double > | eval (std::vector< double > &theta, std::vector< double > &phi, int32_t *ierr=nullptr) |
| eval | |
| int32_t | comm_size () const override |
| void | comm_pack (std::vector< double > &buffer) const override |
| comm_pack | |
| void | comm_expand (std::vector< double > &buffer) override |
| comm_expand | |
| double | mse () const override |
| int32_t | core_comm_size () const override |
| void | core_comm_pack (std::vector< double > &buffer) const override |
| core_comm_pack | |
| void | core_comm_expand (std::vector< double > &buffer) override |
| core_comm_expand | |
| void | destroy_base () override |
| std::vector< double > | theta_vector () const |
| Deep copy of component 'theta' as a std::vector. | |
| fxArray< double > | theta () const |
| Zero-copy fxArray view of component 'theta'. | |
| std::vector< double > | phi_vector () const |
| Deep copy of component 'phi' as a std::vector. | |
| fxArray< double > | phi () const |
| Zero-copy fxArray view of component 'phi'. | |
| std::vector< double > | r_vector () const |
| Deep copy of component 'r' as a std::vector. | |
| fxArray< double > | r () const |
| Zero-copy fxArray view of component 'r'. | |
| std::vector< double > | w_vector () const |
| Deep copy of component 'w' as a std::vector. | |
| fxArray< double > | w () const |
| Zero-copy fxArray view of component 'w'. | |
| std::vector< double > | wrk2_vector () const |
| Deep copy of component 'wrk2' as a std::vector. | |
| fxArray< double > | wrk2 () const |
| Zero-copy fxArray view of component 'wrk2'. | |
| std::vector< double > | t_vector () const |
| Deep copy of component 't' as a std::vector. | |
| std::array< int64_t, 2 > | t_shape () const |
| Extents of component 't', leading dimension first. | |
| fxArray< double > | t () const |
| Zero-copy fxArray view of component 't'. | |
| int32_t & | m () |
| const int32_t & | m () const |
| int32_t & | lwrk2 () |
| const int32_t & | lwrk2 () const |
| int32_t & | nmax () |
| const int32_t & | nmax () const |
Public Member Functions inherited from fpFitter | |
| virtual | ~fpFitter ()=default |
| const char * | fortran_type_name () const |
| Return the dynamic Fortran type name of the underlying object. | |
| fitpack_fitter_c & | c_handle () |
| Get underlying C wrapper (for interop) | |
| const fitpack_fitter_c & | c_handle () const |
| Get underlying C wrapper (const, for interop) | |
| std::vector< double > | c_vector () const |
| Deep copy of component 'c' as a std::vector. | |
| fxArray< double > | c () const |
| Zero-copy fxArray view of component 'c'. | |
| std::vector< double > | wrk_vector () const |
| Deep copy of component 'wrk' as a std::vector. | |
| fxArray< double > | wrk () const |
| Zero-copy fxArray view of component 'wrk'. | |
| std::vector< int32_t > | iwrk_vector () const |
| Deep copy of component 'iwrk' as a std::vector. | |
| fxArray< int32_t > | iwrk () const |
| Zero-copy fxArray view of component 'iwrk'. | |
| int32_t & | iopt () |
| const int32_t & | iopt () const |
| double & | smoothing () |
| const double & | smoothing () const |
| double & | fp () |
| const double & | fp () const |
| int32_t & | lwrk () |
| const int32_t & | lwrk () const |
| int32_t & | liwrk () |
| const int32_t & | liwrk () const |
Static Public Member Functions | |
| static fpSphere | make_view () |
| Construct an empty (non-owning) wrapper, for use as a view target. | |
Protected Member Functions | |
| fpSphere (NoAlloc tag) | |
Protected Member Functions inherited from fpFitter | |
| fpFitter (NoAlloc) | |
| Protected constructor for derived classes (does not allocate) | |
| template<typename T> | |
| T * | as () |
| template<typename T> | |
| const T * | as () const |
Additional Inherited Members | |
Protected Attributes inherited from fpFitter | |
| fitpack_fitter_c | cobj = fitpack_fitter_c_null |
Standalone C++ RAII wrapper for Fortran fitpack_sphere.
This class provides automatic memory management (RAII) and a natural C++ API for the underlying Fortran fitpack_sphere, without requiring the fortran-arrays library. Array arguments use std::vector<T> for standalone operation. Extends fpFitter (Fortran: extends(fitpack_fitter))
|
inline |
Default constructor - allocates new fitpack_sphere.

|
inlineoverride |
Destructor - deallocates if owned.

|
inline |
Copy constructor - deep copy.

|
inlinenoexcept |
Move constructor - transfer ownership.

|
inlineexplicit |
Construct from existing C wrapper (takes ownership if move=true)

|
inlineexplicit |
Non-owning view ctor: bit-copy the C handle, mark is_pointer=true. Used by parent classes' polymorphic accessors to wrap a base-class handle as the correct concrete subtype.

|
inlineexplicitprotected |

|
inline |
Upcast to parent type (reference, no copy)

|
inline |

|
inline |
Get underlying C wrapper (for interop)

|
inline |
Get underlying C wrapper (const, for interop)

|
inlineoverridevirtual |
Return the C wrapper struct name for this class (e.g. "fitpack_sphere_c").
Reimplemented from fpFitter.

|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Return the fully-qualified C++ class name for this class. Owned by the C++ layer — does not round-trip through Fortran.
Reimplemented from fpFitter.
|
inlineoverridevirtual |
|
inlinevirtual |

|
inlinevirtual |
eval

|
inlinevirtual |

|
inlinevirtual |

|
inlineoverridevirtual |
Check if object is allocated.
Reimplemented from fpFitter.

|
inlineoverridevirtual |
Check if this is a non-owning pointer.
Reimplemented from fpFitter.

|
inlinevirtual |

|
inline |

|
inline |

|
inline |

|
inline |

|
inlinestatic |
Construct an empty (non-owning) wrapper, for use as a view target.
The returned object has a null handle (cptr==nullptr, is_pointer==false) and does NOT allocate a Fortran object. Intended as a fill target for member-view accessors emitted on parent types — the parent populates the handle with c_loc() into its own storage and sets is_pointer=true.

|
inlineoverridevirtual |
|
inlinevirtual |
new_fit

|
inlinevirtual |
new_points

|
inline |

|
inline |

Copy assignment - deep copy.

Move assignment - transfer ownership.

|
inline |
Zero-copy fxArray view of component 'phi'.
array_c_from_ptr builds the descriptor from the borrowed pointer and bounds, so the view aliases the Fortran storage directly — nothing is copied and writes through phi()(i) land in the object.

|
inline |
Deep copy of component 'phi' as a std::vector.

|
inline |
Zero-copy fxArray view of component 'r'.
array_c_from_ptr builds the descriptor from the borrowed pointer and bounds, so the view aliases the Fortran storage directly — nothing is copied and writes through r()(i) land in the object.

|
inline |
Deep copy of component 'r' as a std::vector.

|
inline |
Zero-copy fxArray view of component 't'.
array_c_from_ptr builds the descriptor from the borrowed pointer and bounds, so the view aliases the Fortran storage directly — nothing is copied and writes through t()(i, j) land in the object.

|
inline |
Extents of component 't', leading dimension first.

|
inline |
Deep copy of component 't' as a std::vector.
The rank-2 component is flattened COLUMN-MAJOR (Fortran order): element (i, j, ...) — zero-based — is at index i + j * extents[0] + ... Query the extents with t_shape().

|
inline |
Zero-copy fxArray view of component 'theta'.
array_c_from_ptr builds the descriptor from the borrowed pointer and bounds, so the view aliases the Fortran storage directly — nothing is copied and writes through theta()(i) land in the object.

|
inline |
Deep copy of component 'theta' as a std::vector.

|
inline |
Zero-copy fxArray view of component 'w'.
array_c_from_ptr builds the descriptor from the borrowed pointer and bounds, so the view aliases the Fortran storage directly — nothing is copied and writes through w()(i) land in the object.

|
inline |
Deep copy of component 'w' as a std::vector.

|
inline |
Zero-copy fxArray view of component 'wrk2'.
array_c_from_ptr builds the descriptor from the borrowed pointer and bounds, so the view aliases the Fortran storage directly — nothing is copied and writes through wrk2()(i) land in the object.

|
inline |
Deep copy of component 'wrk2' as a std::vector.
