Method
NumCosmoMathFunctionSampleSetiter_insert_after
Declaration [src]
void
ncm_function_sample_set_iter_insert_after (
NcmFunctionSampleSet* fss,
NcmFunctionSampleSetIter* iter,
const gdouble x,
NcmVector* y,
NcmFunctionSampleSetIter** iter_out
)
Description [src]
Inserts a new sample after the position of iter. The vector y must have dimension
matching fss:len property. 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.
y-
Type:
NcmVectorVector value at
x.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.