Top |
NcmFunctionCache * | ncm_function_cache_new () |
NcmFunctionCache * | ncm_function_cache_ref () |
void | ncm_function_cache_free () |
void | ncm_function_cache_clear () |
gdouble | ncm_function_cache_get_reltol () |
gdouble | ncm_function_cache_get_abstol () |
void | ncm_function_cache_empty_cache () |
void | ncm_function_cache_insert () |
void | ncm_function_cache_insert_vector () |
gboolean | ncm_function_cache_get () |
gboolean | ncm_function_cache_get_near () |
A simple cache that saves function values at different argument values. It can be used to find an already computed value or the value of the function closest to an already computed point.
NcmFunctionCache * ncm_function_cache_new (guint n
,gdouble abstol
,gdouble reltol
);
Creates a new NcmFunctionCache for a n
dimensional function.
The points are considered the same within the tolerance
described by abstol
and reltol
.
NcmFunctionCache *
ncm_function_cache_ref (NcmFunctionCache *cache
);
Increase the reference of cache
by one.
void
ncm_function_cache_free (NcmFunctionCache *cache
);
Decrease the reference count of cache
by one.
void
ncm_function_cache_clear (NcmFunctionCache **cache
);
Decrease the reference count of cache
by one, and sets the pointer *cache
to
NULL.
void
ncm_function_cache_empty_cache (NcmFunctionCache *cache
);
Empties the content of cache
.
void ncm_function_cache_insert (NcmFunctionCache *cache
,gdouble x
,...
);
Insert a new point in the cache.
[skip]
void ncm_function_cache_insert_vector (NcmFunctionCache *cache
,gdouble x
,NcmVector *p
);
Insert a new point in the cache.
gboolean ncm_function_cache_get (NcmFunctionCache *cache
,gdouble *x_ptr
,NcmVector **v
);
Searches the cache
and returns the value of the function at $x$.
[skip]
gboolean ncm_function_cache_get_near (NcmFunctionCache *cache
,gdouble x
,gdouble *x_found_ptr
,NcmVector **v
,NcmFunctionCacheSearchType type
);
Searches the cache
and returns the value of the function closest to $x$, $x_c$.
“abstol”
property “abstol” double
Absolute tolerance.
Owner: NcmFunctionCache
Flags: Read / Write / Construct Only
Allowed values: >= 0
Default value: 0
“dimension”
property “dimension” guint
Function dimension.
Owner: NcmFunctionCache
Flags: Read / Write / Construct Only
Allowed values: >= 1
Default value: 1