Method

NumCosmoMathFunctionCacheget_near

Declaration [src]

gboolean
ncm_function_cache_get_near (
  NcmFunctionCache* cache,
  gdouble x,
  gdouble* x_found_ptr,
  NcmVector** v,
  NcmFunctionCacheSearchType type
)

Description [src]

Searches the cache and returns the value of the function closest to $x$, $x_c$.

Parameters

x

Type: gdouble

The argument $x$.

x_found_ptr

Type: gdouble*

Whether a point $x_c$ close to $x$ was found in the cache.

The data is owned by the caller of the method.
v

Type: NcmVector

The function at $x_c$ or NULL if no point was not found.

The argument will be set by the function.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.
type

Type: NcmFunctionCacheSearchType

A NcmFunctionCacheSearchType.

Return value

Type: gboolean

Whether a point $x_c$ was found.