HI_StatBuffer

HI_StatBuffer — generates summary statistics on Y-values.

Syntax

#include <cogent.h>
ST_STATUS HI_StatBuffer(int  nvalues,
 HI_stVALUE*  values,
 double*  minptr,
 double*  maxptr,
 double*  meanptr,
 double*  stddevptr);

Arguments

nvalues

The number of values in the values array.

values

An array of HI_stVALUE structures.

minptr

A pointer to the minimum Y-value.

maxptr

A pointer to the maxium Y-value.

meanptr

A pointer to the mean Y-value.

stddevptr

A pointer to the standard deviation of the Y-values.

Returns

t (true) if the function completed successfully, otherwise nil.

Description

This function generates a set of summary statistics on the Y-value data in a buffer: minimum value, maximum value, mean, and standard deviation. The X-value data is ignored. The buffer data would typically represent the result of a query for all values of a specific history (previously retrieved with the Cascade Historian hist_read_buffer function). The summary statistics can then be used to provide some idea of the nature of the data, or could be used to automatically scale the display of the data.

This function corresponds to the Cascade Historian hist_stat_buffer dynamic library function.