Class
NumCosmoMathFunctionCache
Description [src]
final class NumCosmoMath.FunctionCache : GObject.Object
{
/* No available fields */
}
Cache of vector-valued function values keyed by a scalar argument.
Stores values $f(x) \in \mathbb{R}^n$ and returns either the value at a cached $x$ or the value at the cached argument closest to a given $x$. Two arguments are the same key when they agree to a relative tolerance of $10^{-15}$. Insertion and lookup are thread-safe.
NcmFunctionCache:abstol and NcmFunctionCache:reltol are kept for the code that fills
the cache; ncm_integral_cached_x_inf(), for example, uses them as integration tolerances.
Instance methods
ncm_function_cache_empty_cache
Empties cache. The entries are released on the next insertion or lookup.
ncm_function_cache_get_near
Finds the cached argument $x_c$ closest to $x$ in the direction given by type.
A cached argument within NcmFunctionCache:reltol of $x$ counts as equal to $x$,
satisfies every type and ends the search. x_found_ptr and v are set only when
$x_c$ exists.
ncm_function_cache_insert_vector
Adds $f(x)$ to cache, holding a reference to p. Does nothing if $x$ is
already cached. The length of p must be the function dimension.
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.