hist_gap_buffer

hist_gap_buffer — identifies and fills gaps in data that are too large for interpolation.

Syntax

hist_gap_buffer (buffer, gap_threshold)
    

Parameters

buffer

A binary buffer of X-Y pairs of doubles, as created by a call to hist_buffer_id_read.

gap_threshold

The threshold difference between adjacent X values that determines the existence of a gap.

Returns

A new buffer if any gaps were found, otherwise the old buffer.

Description

This function inserts duplicate Y-value points into the buffer when the X-axis gap between a pair of values exceeds the specified gap threshold. This will cause the graph of the data to show a constant value spanning the gap, rather than a misleading ramp between the points.

This function is also available in two parts as the Cogent C API functions HI_GapCountBuffer and HI_GapFillBuffer.

Example

buf = hist_gap_buffer (buf, 10.0);