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.

Ancestors

Constructors

ncm_function_cache_new

Creates a new NcmFunctionCache for an n-dimensional function.

Functions

ncm_function_cache_clear

Decreases the reference count of cache by one and sets cache to NULL.

Instance methods

ncm_function_cache_empty_cache

Empties cache. The entries are released on the next insertion or lookup.

ncm_function_cache_free

Decreases the reference count of cache by one.

ncm_function_cache_get

Looks up $x$ in cache. v is set only when $x$ is cached.

ncm_function_cache_get_abstol
No description available.

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_get_reltol
No description available.

ncm_function_cache_insert

Adds $f(x)$ to cache. Does nothing if $x$ is already cached.

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.

ncm_function_cache_ref

Increases the reference count of cache by one.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

NumCosmoMath.FunctionCache:abstol
No description available.

NumCosmoMath.FunctionCache:dimension
No description available.

NumCosmoMath.FunctionCache:reltol
No description available.

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.

Class structure

struct NumCosmoMathFunctionCacheClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.