Struct
NumCosmoMathFunctionSampleSetIter
Description [src]
struct NcmFunctionSampleSetIter {
NcmFunctionSampleSet* owner;
}
Iterator for traversing samples in a NcmFunctionSampleSet.
Provides O(1) access to sample data once positioned, making it efficient
for sequential traversal and interval operations.
Structure members
owner:NcmFunctionSampleSetThe
NcmFunctionSampleSetbeing iterated.
Instance methods
ncm_function_sample_set_iter_copy
Copies the position of iter into iter_out.
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.
ncm_function_sample_set_iter_free
Frees a heap-allocated iterator. Only call this for iterators allocated by the
callee (i.e. when a NULL pointer was passed as the iter_out argument to
ncm_function_sample_set_iter_begin(), ncm_function_sample_set_iter_end(),
ncm_function_sample_set_iter_copy(), or the insert functions). Stack-allocated
iterators must not be freed with this function.
ncm_function_sample_set_iter_get_interval_ok
Gets the interval_ok flag of the sample pointed to by iter.
This indicates whether the interval from this sample to the next has
passed refinement tests.
ncm_function_sample_set_iter_get_new_point
Gets the new_point flag of the sample pointed to by iter.
ncm_function_sample_set_iter_inc_interval_ok
Increments the interval_ok flag of the sample pointed to by iter.
ncm_function_sample_set_iter_next
Moves iter to the next sample. If iter is at the last sample or invalid,
iter becomes invalid.
ncm_function_sample_set_iter_next_pair
Helper for interval operations. Sets next_iter to point to the sample after iter.
This is useful for iterating over intervals where you need both endpoints.
ncm_function_sample_set_iter_prev
Moves iter to the previous sample. If iter is at the first sample or invalid,
behavior is undefined.
ncm_function_sample_set_iter_set_interval_ok
Sets the interval_ok flag of the sample pointed to by iter.
ncm_function_sample_set_iter_set_new_point
Sets the new_point flag of the sample pointed to by iter.