fitpack
Modern Fortran library for curve and surface fitting with splines
Loading...
Searching...
No Matches
fpConstrainedCurve Class Reference

Standalone C++ RAII wrapper for Fortran fitpack_constrained_curve. More...

#include <fpConstrainedCurve.hpp>

Inheritance diagram for fpConstrainedCurve:
Collaboration diagram for fpConstrainedCurve:

Public Member Functions

 fpConstrainedCurve ()
 Default constructor - allocates new fitpack_constrained_curve.
 
 ~fpConstrainedCurve () override
 Destructor - deallocates if owned.
 
 fpConstrainedCurve (const fpConstrainedCurve &other)
 Copy constructor - deep copy.
 
fpConstrainedCurveoperator= (const fpConstrainedCurve &other)
 Copy assignment - deep copy.
 
 fpConstrainedCurve (fpConstrainedCurve &&other) noexcept
 Move constructor - transfer ownership.
 
fpConstrainedCurveoperator= (fpConstrainedCurve &&other) noexcept
 Move assignment - transfer ownership.
 
 fpConstrainedCurve (fitpack_constrained_curve_c &c_wrapper, bool move=false)
 Construct from existing C wrapper (takes ownership if move=true)
 
 fpConstrainedCurve (fitpack_constrained_curve_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_constrained_curve_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_constrained_curve_c & c_handle ()
 Get underlying C wrapper (for interop)
 
const fitpack_constrained_curve_c & c_handle () const
 Get underlying C wrapper (const, for interop)
 
fpParametricCurveas_parent ()
 Upcast to parent type (reference, no copy)
 
const fpParametricCurveas_parent () const
 
virtual void clean_constraints ()
 
virtual void set_constraints (int32_t ddx_begin_n1, int32_t ddx_begin_n2, int32_t ddx_end_n1, int32_t ddx_end_n2, double *ddx_begin=nullptr, double *ddx_end=nullptr, int32_t *ierr=nullptr)
 set_constraints
 
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
 
void new_points (int32_t x_n1, int32_t x_n2, std::vector< double > &x, double *u=nullptr, double *w=nullptr) override
 new_points
 
void set_default_parameters () override
 
int32_t new_fit (int32_t x_n1, int32_t x_n2, std::vector< double > &x, double *u=nullptr, double *w=nullptr, double *smoothing=nullptr, int32_t *order=nullptr) override
 new_fit
 
int32_t fit (double *smoothing=nullptr, int32_t *order=nullptr, bool *keep_knots=nullptr) override
 
int32_t interpolate (int32_t *order=nullptr, bool *reset_knots=nullptr) override
 
int32_t least_squares (double *smoothing=nullptr, bool *reset_knots=nullptr) override
 
std::vector< double > eval_one (double u, int32_t n_result, int32_t *ierr=nullptr) override
 eval_one
 
std::vector< double > eval_many (std::vector< double > &u, int32_t n_result, int32_t *ierr=nullptr) override
 eval_many
 
std::vector< double > dfdx (double u, int32_t order, int32_t n_result, int32_t *ierr=nullptr) override
 dfdx
 
std::vector< double > dfdx (std::vector< double > &u, int32_t order, int32_t n_result, int32_t *ierr=nullptr) override
 dfdx
 
std::vector< double > dfdx_all (double u, int32_t n_result, int32_t *ierr=nullptr) override
 dfdx_all
 
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 > deriv_begin_vector () const
 Deep copy of component 'deriv_begin' as a std::vector.
 
std::array< int64_t, 2 > deriv_begin_shape () const
 Extents of component 'deriv_begin', leading dimension first.
 
fxArray< double > deriv_begin () const
 Zero-copy fxArray view of component 'deriv_begin'.
 
std::vector< double > deriv_end_vector () const
 Deep copy of component 'deriv_end' as a std::vector.
 
std::array< int64_t, 2 > deriv_end_shape () const
 Extents of component 'deriv_end', leading dimension first.
 
fxArray< double > deriv_end () const
 Zero-copy fxArray view of component 'deriv_end'.
 
std::vector< double > xx_vector () const
 Deep copy of component 'xx' as a std::vector.
 
std::array< int64_t, 2 > xx_shape () const
 Extents of component 'xx', leading dimension first.
 
fxArray< double > xx () const
 Zero-copy fxArray view of component 'xx'.
 
std::vector< double > cp_vector () const
 Deep copy of component 'cp' as a std::vector.
 
std::array< int64_t, 2 > cp_shape () const
 Extents of component 'cp', leading dimension first.
 
fxArray< double > cp () const
 Zero-copy fxArray view of component 'cp'.
 
int32_t & ib ()
 
const int32_t & ib () const
 
int32_t & ie ()
 
const int32_t & ie () const
 
template<FP_SIZE dim>
FP_FLAG constrain_begin (const std::vector< fpPoint< dim > > &ddx_begin)
 Pin the begin endpoint; leave the end endpoint free.
 
template<FP_SIZE dim>
FP_FLAG constrain_both (const std::vector< fpPoint< dim > > &ddx_begin, const std::vector< fpPoint< dim > > &ddx_end)
 Pin both endpoints.
 
template<FP_SIZE dim>
FP_FLAG constrain_end (const std::vector< fpPoint< dim > > &ddx_end)
 Pin the end endpoint; leave the begin endpoint free.
 
template<FP_SIZE dim>
FP_FLAG new_fit (const std::vector< fpPoint< dim > > &x, FP_REAL smoothing=1000.0, FP_SIZE order=3)
 Fit a new curve through the points, choosing u by cumulative Euclidean distance.
 
template<FP_SIZE dim>
FP_FLAG new_fit (const std::vector< fpPoint< dim > > &x, const std::vector< FP_REAL > &u, FP_REAL smoothing=1000.0, FP_SIZE order=3)
 Fit a new curve through the points at the given parameter values u.
 
template<FP_SIZE dim>
FP_FLAG new_fit (const std::vector< fpPoint< dim > > &x, const std::vector< FP_REAL > &u, const std::vector< FP_REAL > &w, FP_REAL smoothing=1000.0, FP_SIZE order=3)
 Fit a new curve through the points at parameter values u, with weights w.
 
FP_FLAG fit (FP_SIZE order)
 Refit the current points with a new spline order.
 
FP_FLAG fit (FP_REAL smoothing)
 Refit the current points with a new smoothing.
 
FP_FLAG fit (FP_REAL smoothing, FP_SIZE order)
 Refit the current points with a new smoothing and spline order.
 
- Public Member Functions inherited from fpParametricCurve
 fpParametricCurve ()
 Default constructor - allocates new fitpack_parametric_curve.
 
 ~fpParametricCurve () override
 Destructor - deallocates if owned.
 
 fpParametricCurve (const fpParametricCurve &other)
 Copy constructor - deep copy.
 
fpParametricCurveoperator= (const fpParametricCurve &other)
 Copy assignment - deep copy.
 
 fpParametricCurve (fpParametricCurve &&other) noexcept
 Move constructor - transfer ownership.
 
fpParametricCurveoperator= (fpParametricCurve &&other) noexcept
 Move assignment - transfer ownership.
 
 fpParametricCurve (fitpack_parametric_curve_c &c_wrapper, bool move=false)
 Construct from existing C wrapper (takes ownership if move=true)
 
 fpParametricCurve (fitpack_parametric_curve_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_parametric_curve_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_parametric_curve_c & c_handle ()
 Get underlying C wrapper (for interop)
 
const fitpack_parametric_curve_c & c_handle () const
 Get underlying C wrapper (const, for interop)
 
fpFitteras_parent ()
 Upcast to parent type (reference, no copy)
 
const fpFitteras_parent () const
 
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 > x_vector () const
 Deep copy of component 'x' as a std::vector.
 
std::array< int64_t, 2 > x_shape () const
 Extents of component 'x', leading dimension first.
 
fxArray< double > x () const
 Zero-copy fxArray view of component 'x'.
 
std::vector< double > u_vector () const
 Deep copy of component 'u' as a std::vector.
 
fxArray< double > u () const
 Zero-copy fxArray view of component 'u'.
 
std::vector< double > sp_vector () const
 Deep copy of component 'sp' as a std::vector.
 
fxArray< double > sp () const
 Zero-copy fxArray view of component 'sp'.
 
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 > dd_vector () const
 Deep copy of component 'dd' as a std::vector.
 
std::array< int64_t, 2 > dd_shape () const
 Extents of component 'dd', leading dimension first.
 
fxArray< double > dd () const
 Zero-copy fxArray view of component 'dd'.
 
std::vector< double > t_vector () const
 Deep copy of component 't' as a std::vector.
 
fxArray< double > t () const
 Zero-copy fxArray view of component 't'.
 
int32_t & m ()
 
const int32_t & m () const
 
int32_t & idim ()
 
const int32_t & idim () const
 
bool has_params () const
 
void set_has_params (bool value)
 
int32_t & order ()
 
const int32_t & order () const
 
double & ubegin ()
 
const double & ubegin () const
 
double & uend ()
 
const double & uend () const
 
int32_t & nest ()
 
const int32_t & nest () const
 
int32_t & knots ()
 
const int32_t & knots () const
 
FP_SIZE degree () const
 Spline degree k of the current fit.
 
FP_SIZE ndim () const
 Number of space dimensions of the fitted curve.
 
template<FP_SIZE dim>
FP_FLAG new_fit (const std::vector< fpPoint< dim > > &x, FP_REAL smoothing=1000.0, FP_SIZE order=3)
 Fit a new curve through the points, choosing u by cumulative Euclidean distance.
 
template<FP_SIZE dim>
FP_FLAG new_fit (const std::vector< fpPoint< dim > > &x, const std::vector< FP_REAL > &u, FP_REAL smoothing=1000.0, FP_SIZE order=3)
 Fit a new curve through the points at the given parameter values u.
 
template<FP_SIZE dim>
FP_FLAG new_fit (const std::vector< fpPoint< dim > > &x, const std::vector< FP_REAL > &u, const std::vector< FP_REAL > &w, FP_REAL smoothing=1000.0, FP_SIZE order=3)
 Fit a new curve through the points at parameter values u, with weights w.
 
FP_FLAG fit (FP_SIZE order)
 Refit the current points with a new spline order.
 
FP_FLAG fit (FP_REAL smoothing)
 Refit the current points with a new smoothing.
 
FP_FLAG fit (FP_REAL smoothing, FP_SIZE order)
 Refit the current points with a new smoothing and spline order.
 
template<FP_SIZE dim>
fpPoint< dim > eval (FP_REAL u, FP_FLAG *ierr=nullptr)
 Evaluate the curve at the parameter value u.
 
template<FP_SIZE dim>
std::vector< fpPoint< dim > > eval (const std::vector< FP_REAL > &u, FP_FLAG *ierr=nullptr)
 Evaluate the curve at every parameter value in u.
 
template<FP_SIZE dim>
fpPoint< dim > ddu (FP_REAL u, FP_SIZE order, FP_FLAG *ierr=nullptr)
 Derivative of the given order at the parameter value u.
 
template<FP_SIZE dim>
std::vector< fpPoint< dim > > ddu_all (FP_REAL u, FP_FLAG *ierr=nullptr)
 All derivatives (orders 0..k) at the parameter value u.
 
- 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 fpConstrainedCurve make_view ()
 Construct an empty (non-owning) wrapper, for use as a view target.
 
- Static Public Member Functions inherited from fpParametricCurve
static fpParametricCurve make_view ()
 Construct an empty (non-owning) wrapper, for use as a view target.
 

Protected Member Functions

 fpConstrainedCurve (NoAlloc tag)
 
- Protected Member Functions inherited from fpParametricCurve
 fpParametricCurve (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
 

Detailed Description

Standalone C++ RAII wrapper for Fortran fitpack_constrained_curve.

This class provides automatic memory management (RAII) and a natural C++ API for the underlying Fortran fitpack_constrained_curve, without requiring the fortran-arrays library. Array arguments use std::vector<T> for standalone operation. Extends fpParametricCurve (Fortran: extends(fitpack_parametric_curve))

Constructor & Destructor Documentation

◆ fpConstrainedCurve() [1/6]

fpConstrainedCurve::fpConstrainedCurve ( )
inline

Default constructor - allocates new fitpack_constrained_curve.

Here is the call graph for this function:

◆ ~fpConstrainedCurve()

fpConstrainedCurve::~fpConstrainedCurve ( )
inlineoverride

Destructor - deallocates if owned.

Here is the call graph for this function:

◆ fpConstrainedCurve() [2/6]

fpConstrainedCurve::fpConstrainedCurve ( const fpConstrainedCurve & other)
inline

Copy constructor - deep copy.

Here is the call graph for this function:

◆ fpConstrainedCurve() [3/6]

fpConstrainedCurve::fpConstrainedCurve ( fpConstrainedCurve && other)
inlinenoexcept

Move constructor - transfer ownership.

Here is the call graph for this function:

◆ fpConstrainedCurve() [4/6]

fpConstrainedCurve::fpConstrainedCurve ( fitpack_constrained_curve_c & c_wrapper,
bool move = false )
inlineexplicit

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

Here is the call graph for this function:

◆ fpConstrainedCurve() [5/6]

fpConstrainedCurve::fpConstrainedCurve ( fitpack_constrained_curve_c & c_wrapper,
ViewTag  )
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.

Here is the call graph for this function:

◆ fpConstrainedCurve() [6/6]

fpConstrainedCurve::fpConstrainedCurve ( NoAlloc tag)
inlineexplicitprotected
Here is the call graph for this function:

Member Function Documentation

◆ as_parent() [1/2]

fpParametricCurve & fpConstrainedCurve::as_parent ( )
inline

Upcast to parent type (reference, no copy)

Here is the call graph for this function:

◆ as_parent() [2/2]

const fpParametricCurve & fpConstrainedCurve::as_parent ( ) const
inline
Here is the call graph for this function:

◆ c_handle() [1/2]

fitpack_constrained_curve_c & fpConstrainedCurve::c_handle ( )
inline

Get underlying C wrapper (for interop)

Here is the call graph for this function:

◆ c_handle() [2/2]

const fitpack_constrained_curve_c & fpConstrainedCurve::c_handle ( ) const
inline

Get underlying C wrapper (const, for interop)

Here is the call graph for this function:

◆ c_type_name()

const char * fpConstrainedCurve::c_type_name ( ) const
inlineoverridevirtual

Return the C wrapper struct name for this class (e.g. "fitpack_constrained_curve_c").

Reimplemented from fpFitter.

Here is the call graph for this function:

◆ clean_constraints()

virtual void fpConstrainedCurve::clean_constraints ( )
inlinevirtual
Here is the call graph for this function:

◆ comm_expand()

void fpConstrainedCurve::comm_expand ( std::vector< double > & buffer)
inlineoverridevirtual

comm_expand

Implements fpFitter.

Here is the call graph for this function:

◆ comm_pack()

void fpConstrainedCurve::comm_pack ( std::vector< double > & buffer) const
inlineoverridevirtual

comm_pack

Implements fpFitter.

Here is the call graph for this function:

◆ comm_size()

int32_t fpConstrainedCurve::comm_size ( ) const
inlineoverridevirtual

Implements fpFitter.

Here is the call graph for this function:

◆ constrain_begin()

template<FP_SIZE dim>
FP_FLAG fpConstrainedCurve::constrain_begin ( const std::vector< fpPoint< dim > > & ddx_begin)
inline

Pin the begin endpoint; leave the end endpoint free.

Here is the call graph for this function:

◆ constrain_both()

template<FP_SIZE dim>
FP_FLAG fpConstrainedCurve::constrain_both ( const std::vector< fpPoint< dim > > & ddx_begin,
const std::vector< fpPoint< dim > > & ddx_end )
inline

Pin both endpoints.

Here is the call graph for this function:

◆ constrain_end()

template<FP_SIZE dim>
FP_FLAG fpConstrainedCurve::constrain_end ( const std::vector< fpPoint< dim > > & ddx_end)
inline

Pin the end endpoint; leave the begin endpoint free.

Here is the call graph for this function:

◆ core_comm_expand()

void fpConstrainedCurve::core_comm_expand ( std::vector< double > & buffer)
inlineoverridevirtual

core_comm_expand

Reimplemented from fpFitter.

Here is the call graph for this function:

◆ core_comm_pack()

void fpConstrainedCurve::core_comm_pack ( std::vector< double > & buffer) const
inlineoverridevirtual

core_comm_pack

Reimplemented from fpFitter.

Here is the call graph for this function:

◆ core_comm_size()

int32_t fpConstrainedCurve::core_comm_size ( ) const
inlineoverridevirtual

Reimplemented from fpFitter.

Here is the call graph for this function:

◆ cp()

fxArray< double > fpConstrainedCurve::cp ( ) const
inline

Zero-copy fxArray view of component 'cp'.

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 cp()(i, j) land in the object.

Note
Only available when the Fortran-Arrays library is present and enabled (HAVE_FXARRAY).
Warning
The view is invalidated by any refit, assignment or destroy call on this object; re-read it rather than retaining it.
Here is the call graph for this function:

◆ cp_shape()

std::array< int64_t, 2 > fpConstrainedCurve::cp_shape ( ) const
inline

Extents of component 'cp', leading dimension first.

Returns
All zeros when the component is unallocated.
Here is the call graph for this function:

◆ cp_vector()

std::vector< double > fpConstrainedCurve::cp_vector ( ) const
inline

Deep copy of component 'cp' 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 cp_shape().

Returns
An owning copy, empty when the component is unallocated.
Here is the call graph for this function:

◆ cpp_type_name()

const char * fpConstrainedCurve::cpp_type_name ( ) const
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.

◆ deriv_begin()

fxArray< double > fpConstrainedCurve::deriv_begin ( ) const
inline

Zero-copy fxArray view of component 'deriv_begin'.

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 deriv_begin()(i, j) land in the object.

Note
Only available when the Fortran-Arrays library is present and enabled (HAVE_FXARRAY).
Warning
The view is invalidated by any refit, assignment or destroy call on this object; re-read it rather than retaining it.
Here is the call graph for this function:

◆ deriv_begin_shape()

std::array< int64_t, 2 > fpConstrainedCurve::deriv_begin_shape ( ) const
inline

Extents of component 'deriv_begin', leading dimension first.

Returns
All zeros when the component is unallocated.
Here is the call graph for this function:

◆ deriv_begin_vector()

std::vector< double > fpConstrainedCurve::deriv_begin_vector ( ) const
inline

Deep copy of component 'deriv_begin' 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 deriv_begin_shape().

Returns
An owning copy, empty when the component is unallocated.
Here is the call graph for this function:

◆ deriv_end()

fxArray< double > fpConstrainedCurve::deriv_end ( ) const
inline

Zero-copy fxArray view of component 'deriv_end'.

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 deriv_end()(i, j) land in the object.

Note
Only available when the Fortran-Arrays library is present and enabled (HAVE_FXARRAY).
Warning
The view is invalidated by any refit, assignment or destroy call on this object; re-read it rather than retaining it.
Here is the call graph for this function:

◆ deriv_end_shape()

std::array< int64_t, 2 > fpConstrainedCurve::deriv_end_shape ( ) const
inline

Extents of component 'deriv_end', leading dimension first.

Returns
All zeros when the component is unallocated.
Here is the call graph for this function:

◆ deriv_end_vector()

std::vector< double > fpConstrainedCurve::deriv_end_vector ( ) const
inline

Deep copy of component 'deriv_end' 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 deriv_end_shape().

Returns
An owning copy, empty when the component is unallocated.
Here is the call graph for this function:

◆ destroy_base()

void fpConstrainedCurve::destroy_base ( )
inlineoverridevirtual

Reimplemented from fpFitter.

Here is the call graph for this function:

◆ dfdx() [1/2]

std::vector< double > fpConstrainedCurve::dfdx ( double u,
int32_t order,
int32_t n_result,
int32_t * ierr = nullptr )
inlineoverridevirtual

dfdx

Reimplemented from fpParametricCurve.

Here is the call graph for this function:

◆ dfdx() [2/2]

std::vector< double > fpConstrainedCurve::dfdx ( std::vector< double > & u,
int32_t order,
int32_t n_result,
int32_t * ierr = nullptr )
inlineoverridevirtual

dfdx

Reimplemented from fpParametricCurve.

Here is the call graph for this function:

◆ dfdx_all()

std::vector< double > fpConstrainedCurve::dfdx_all ( double u,
int32_t n_result,
int32_t * ierr = nullptr )
inlineoverridevirtual

dfdx_all

Reimplemented from fpParametricCurve.

Here is the call graph for this function:

◆ eval_many()

std::vector< double > fpConstrainedCurve::eval_many ( std::vector< double > & u,
int32_t n_result,
int32_t * ierr = nullptr )
inlineoverridevirtual

eval_many

Reimplemented from fpParametricCurve.

Here is the call graph for this function:

◆ eval_one()

std::vector< double > fpConstrainedCurve::eval_one ( double u,
int32_t n_result,
int32_t * ierr = nullptr )
inlineoverridevirtual

eval_one

Reimplemented from fpParametricCurve.

Here is the call graph for this function:

◆ fit() [1/4]

int32_t fpConstrainedCurve::fit ( double * smoothing = nullptr,
int32_t * order = nullptr,
bool * keep_knots = nullptr )
inlineoverridevirtual

Reimplemented from fpParametricCurve.

Here is the call graph for this function:

◆ fit() [2/4]

FP_FLAG fpParametricCurve::fit ( FP_REAL smoothing)
inline

Refit the current points with a new smoothing.

◆ fit() [3/4]

FP_FLAG fpParametricCurve::fit ( FP_REAL smoothing,
FP_SIZE order )
inline

Refit the current points with a new smoothing and spline order.

◆ fit() [4/4]

FP_FLAG fpParametricCurve::fit ( FP_SIZE order)
inline

Refit the current points with a new spline order.

◆ ib() [1/2]

int32_t & fpConstrainedCurve::ib ( )
inline
Here is the call graph for this function:

◆ ib() [2/2]

const int32_t & fpConstrainedCurve::ib ( ) const
inline
Here is the call graph for this function:

◆ ie() [1/2]

int32_t & fpConstrainedCurve::ie ( )
inline
Here is the call graph for this function:

◆ ie() [2/2]

const int32_t & fpConstrainedCurve::ie ( ) const
inline
Here is the call graph for this function:

◆ interpolate()

int32_t fpConstrainedCurve::interpolate ( int32_t * order = nullptr,
bool * reset_knots = nullptr )
inlineoverridevirtual

Reimplemented from fpParametricCurve.

Here is the call graph for this function:

◆ is_allocated()

bool fpConstrainedCurve::is_allocated ( ) const
inlineoverridevirtual

Check if object is allocated.

Reimplemented from fpFitter.

Here is the call graph for this function:

◆ is_pointer()

bool fpConstrainedCurve::is_pointer ( ) const
inlineoverridevirtual

Check if this is a non-owning pointer.

Reimplemented from fpFitter.

Here is the call graph for this function:

◆ least_squares()

int32_t fpConstrainedCurve::least_squares ( double * smoothing = nullptr,
bool * reset_knots = nullptr )
inlineoverridevirtual

Reimplemented from fpParametricCurve.

Here is the call graph for this function:

◆ make_view()

static fpConstrainedCurve fpConstrainedCurve::make_view ( )
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.

Here is the call graph for this function:

◆ mse()

double fpConstrainedCurve::mse ( ) const
inlineoverridevirtual

Reimplemented from fpFitter.

Here is the call graph for this function:

◆ new_fit() [1/4]

template<FP_SIZE dim>
FP_FLAG fpParametricCurve::new_fit ( const std::vector< fpPoint< dim > > & x,
const std::vector< FP_REAL > & u,
const std::vector< FP_REAL > & w,
FP_REAL smoothing = 1000.0,
FP_SIZE order = 3 )
inline

Fit a new curve through the points at parameter values u, with weights w.

◆ new_fit() [2/4]

template<FP_SIZE dim>
FP_FLAG fpParametricCurve::new_fit ( const std::vector< fpPoint< dim > > & x,
const std::vector< FP_REAL > & u,
FP_REAL smoothing = 1000.0,
FP_SIZE order = 3 )
inline

Fit a new curve through the points at the given parameter values u.

◆ new_fit() [3/4]

template<FP_SIZE dim>
FP_FLAG fpParametricCurve::new_fit ( const std::vector< fpPoint< dim > > & x,
FP_REAL smoothing = 1000.0,
FP_SIZE order = 3 )
inline

Fit a new curve through the points, choosing u by cumulative Euclidean distance.

◆ new_fit() [4/4]

int32_t fpConstrainedCurve::new_fit ( int32_t x_n1,
int32_t x_n2,
std::vector< double > & x,
double * u = nullptr,
double * w = nullptr,
double * smoothing = nullptr,
int32_t * order = nullptr )
inlineoverridevirtual

new_fit

Reimplemented from fpParametricCurve.

Here is the call graph for this function:

◆ new_points()

void fpConstrainedCurve::new_points ( int32_t x_n1,
int32_t x_n2,
std::vector< double > & x,
double * u = nullptr,
double * w = nullptr )
inlineoverridevirtual

new_points

Reimplemented from fpParametricCurve.

Here is the call graph for this function:

◆ operator=() [1/2]

fpConstrainedCurve & fpConstrainedCurve::operator= ( const fpConstrainedCurve & other)
inline

Copy assignment - deep copy.

Here is the call graph for this function:

◆ operator=() [2/2]

fpConstrainedCurve & fpConstrainedCurve::operator= ( fpConstrainedCurve && other)
inlinenoexcept

Move assignment - transfer ownership.

Here is the call graph for this function:

◆ set_constraints()

virtual void fpConstrainedCurve::set_constraints ( int32_t ddx_begin_n1,
int32_t ddx_begin_n2,
int32_t ddx_end_n1,
int32_t ddx_end_n2,
double * ddx_begin = nullptr,
double * ddx_end = nullptr,
int32_t * ierr = nullptr )
inlinevirtual

set_constraints

Here is the call graph for this function:

◆ set_default_parameters()

void fpConstrainedCurve::set_default_parameters ( )
inlineoverridevirtual

Reimplemented from fpParametricCurve.

Here is the call graph for this function:

◆ xx()

fxArray< double > fpConstrainedCurve::xx ( ) const
inline

Zero-copy fxArray view of component 'xx'.

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 xx()(i, j) land in the object.

Note
Only available when the Fortran-Arrays library is present and enabled (HAVE_FXARRAY).
Warning
The view is invalidated by any refit, assignment or destroy call on this object; re-read it rather than retaining it.
Here is the call graph for this function:

◆ xx_shape()

std::array< int64_t, 2 > fpConstrainedCurve::xx_shape ( ) const
inline

Extents of component 'xx', leading dimension first.

Returns
All zeros when the component is unallocated.
Here is the call graph for this function:

◆ xx_vector()

std::vector< double > fpConstrainedCurve::xx_vector ( ) const
inline

Deep copy of component 'xx' 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 xx_shape().

Returns
An owning copy, empty when the component is unallocated.
Here is the call graph for this function:

The documentation for this class was generated from the following file: