Class
NumCosmoMathSplineVec
Description [src]
final class NumCosmoMath.SplineVec : GObject.Object
{
/* No available fields */
}
A vector-valued spline function $\vec{F}(x): \mathbb{R} \to \mathbb{R}^n$.
This class represents a vector-valued function where each component is interpolated by a spline sharing the same x-vector. The key optimization is that a single binary search (via ncm_spline_get_index()) is performed, followed by direct evaluation of all components using the index-based methods (*_idx()).
The object can be constructed from: - An x-vector and a matrix where each row is a component y-vector - An x-vector and a GPtrArray of y-vectors.
Constructors
ncm_spline_vec_new
Creates a new NcmSplineVec from a matrix of y-values. Each row of ym
corresponds to one component of the vector function. All components share
the same x-vector xv.
ncm_spline_vec_new_gpa
Creates a new NcmSplineVec from a GPtrArray of y-vectors. Each element
of yv corresponds to one component of the vector function. All components
share the same x-vector xv.
Functions
ncm_spline_vec_clear
Atomically decrements the reference count of sv by one. If the reference
count drops to 0, all memory allocated by sv is released. Sets the pointer
to NULL.
Instance methods
ncm_spline_vec_deriv
Evaluates the derivative of the vector function at x. Uses a single
binary search followed by index-based derivative evaluation for all components.
ncm_spline_vec_deriv_array
Evaluates the derivative of the vector function at x and stores the result
in res. If *res is NULL, a new GArray is created. Otherwise, the
existing array is reused.
ncm_spline_vec_eval
Evaluates the vector function at x. The key optimization is that a single
binary search is performed via ncm_spline_get_index(), then all components
are evaluated using ncm_spline_eval_idx().
ncm_spline_vec_eval_array
Evaluates the vector function at x and stores the result in res.
If *res is NULL, a new GArray is created. Otherwise, the existing array
is reused.
ncm_spline_vec_free
Atomically decrements the reference count of sv by one. If the reference
count drops to 0, all memory allocated by sv is released.
ncm_spline_vec_get_nknots
Gets the number of knot points (x-values) in the spline. All component splines share the same x-vector, so this returns the length of that vector.
ncm_spline_vec_integ
Evaluates the integral of the vector function from xi to xf. Uses index
lookups for both endpoints followed by index-based integration for all components.
ncm_spline_vec_integ_array
Evaluates the integral of the vector function from xi to xf and stores
the result in res. If *res is NULL, a new GArray is created.
Otherwise, the existing array is reused.
ncm_spline_vec_set
Sets the data for sv from a matrix. Each row of ym corresponds to one
component of the vector function.
ncm_spline_vec_set_gpa
Sets the data for sv from a GPtrArray of y-vectors. Each element of yv
corresponds to one component of the vector function.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.