Struct

NumCosmoMathLaurentSeriesTPS

Description [src]

struct NcmLaurentSeriesTPS {
  /* No available fields */
}

A truncated power series of order $N$, $\sum_{n=0}^N L_n\,g^n \mod g^{N+1}$, whose coefficients $L_n$ are themselves NcmLaurentSeries. Order is fixed at construction (ncm_laurent_series_tps_new()) and the $N+1$ coefficients are owned directly (no external pool): a NcmLaurentSeriesTPS is meant to be a long-lived, repeatedly-refilled object (see nc_wl_ellipticity_series.c), not a short-lived per-call temporary.

Boxed with reference-count “copy” (ncm_laurent_series_tps_ref()), not a deep copy, matching NcGalaxyShapeFactorData and siblings: a “copy” shares the same underlying storage, so later mutations via the owning object’s own eval()/compute step are visible through every outstanding reference.

Because this is a truncated power series, not a polynomial-ring element, ncm_laurent_series_tps_conv() truncates its product at the shared order of its operands rather than extending to the naive deg(a)+deg(b) — every op below requires a, b (if present) and out to already share the same order.

Constructors

ncm_laurent_series_tps_new

Creates a new NcmLaurentSeriesTPS of order order ($N+1$ zero coefficients, each an independently owned NcmLaurentSeries) plus its own private conv() scratch. Order is immutable for the object’s whole life — meant to be constructed once and refilled many times (see nc_wl_ellipticity_series.c), not a short-lived per-call temporary.

Functions

ncm_laurent_series_tps_clear

Unrefs *tps and sets it to NULL.

Instance methods

ncm_laurent_series_tps_add

Term-by-term $out_m=a_m+sb\cdot b_m$. Writes straight into outs existing slots, no scratch NcmLaurentSeries needed.

ncm_laurent_series_tps_conj

Harmonic-by-harmonic conjugate of every coefficient of a (see ncm_laurent_series_conj_into()), term by term in $g$. Writes straight into outs existing slots, no scratch NcmLaurentSeries needed.

ncm_laurent_series_tps_conv

Truncated Cauchy product $out_m=\sum_{k=0}^m a_k b_{m-k}$ for $m=0..N$ — truncated at the shared order $N$, not extended to $\deg(a)+\deg(b)$ (this is a truncated power series, not a polynomial ring element). The inner fold only ever needs two non-aliasing accumulator buffers (ncm_laurent_series_add_into() forbids out aliasing an input, so the running sum alternates between them: at step $k$, the accumulator from step $k-2$ is already fully consumed and free to reuse for step $k$’s result) plus one transient product buffer — three fixed buffers regardless of order, drawn from outs own private conv_acc/conv_term rather than any external pool.

ncm_laurent_series_tps_eval
No description available.

ncm_laurent_series_tps_eval_ptr
No description available.

ncm_laurent_series_tps_get
No description available.

ncm_laurent_series_tps_order
No description available.

ncm_laurent_series_tps_pow

Raises the truncated power series $a(g)$ to the real power p: $out(g)=a(g)^p \mod g^{N+1}$. Only a plain gdouble exponent is supported (not complex double): every current use (e.g. NcGalaxyShapePopBetas own $\rho^{2(\alpha-1)}$ composition) only ever needs a real exponent, and restricting to real keeps this fully introspectable (no native-only guard needed at all).

ncm_laurent_series_tps_ref

Increases the reference count of tps by one. This is the boxed type’s “copy” function: it shares the same underlying storage rather than deep-copying it (matching NcGalaxyShapeFactorData and siblings), so later mutations through any reference (e.g. the owning evaluator’s own compute step) are visible through every other outstanding reference.

ncm_laurent_series_tps_scale

Term-by-term $out_m=s\cdot a_m$. Writes straight into outs existing slots, no scratch NcmLaurentSeries needed.

ncm_laurent_series_tps_unref

Decreases the reference count of tps by one, freeing it once the count reaches zero.