GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
KDATA_MEAN_ALLOC(3) FreeBSD Library Functions Manual KDATA_MEAN_ALLOC(3)

kdata_mean_allocallocate mean data for plotting

library “libkplot”

#include <cairo.h>
#include <kplot.h>

struct kdata *
kdata_mean_alloc(struct kdata *source);

The kdata_mean_alloc creates a reference-counted data sources for kplot(3). It attaches to zero or more existing data sources and, when they update their values per-index, tracks the mean of the sequence of updated values. Thus, if a mean data source is attached to two sources, its y-value for pair zero will reflect the mean of all values set to pair zero's y-value in the sources. Note that the indexing is absolute: if attached to a bucket or histogram, pair index zero refers to the first internal data storage, not storage mapped from the bucket or histogram.

If source is not NULL, the internal buffer is initialised to the size of the source and all of its x values. The mean is initialised to zero with zero updates. Otherwise, the internal buffer is sized to zero.

Further data sources may be attached with kdata_mean_attach(3).

kdata_mean_alloc returns NULL if memory allocation failed.

kdata_mean_attach(3), kplot(3)

Donald E. Knuth, The Art of Computer Programming: Seminumerical Algorithms, 3rd Edition, Addison-Wesley, Volume 2, 232, Boston, 1998.

The per-bucket mean value can process a maximum number of SIZE_MAX updates.

January 16, 2015 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.