Method
NumCosmoMathFunctionSampleSetiter_insert_before_func
Declaration [src]
void
ncm_function_sample_set_iter_insert_before_func (
NcmFunctionSampleSet* fss,
NcmFunctionSampleSetIter* iter,
const gdouble x,
NcmFunctionSampleSetFunc f,
gpointer user_data,
NcmFunctionSampleSetIter** iter_out
)
Description [src]
Evaluates f at x and inserts the result as a new sample before iter. The new
sample’s interval_ok is initialized to 0 and new_point is set to TRUE. When
iter_out points to a NULL pointer the callee allocates a new iterator that must be
freed with ncm_function_sample_set_iter_free(). When iter_out points to an
already-allocated iterator (e.g. a stack variable) no allocation occurs and no free
is required.
Warning: This does not check if the insertion maintains x-order. Use with care.
Parameters
iter-
Type:
NcmFunctionSampleSetIterA
NcmFunctionSampleSetIter.The data is owned by the caller of the method. x-
Type:
const gdoubleKnot position.
f-
Type:
NcmFunctionSampleSetFuncFunction to evaluate at
x. user_data-
Type:
gpointerUser data to pass to
f.The argument can be NULL.The data is owned by the caller of the method. iter_out-
Type:
NcmFunctionSampleSetIterIterator pointing to the newly inserted sample; if *
iter_outisNULLa new iterator is heap-allocated, otherwise the existing memory is reused.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.