![]() |
![]() |
![]() |
gtk-hst reference manual | ![]() |
---|---|---|---|---|
#include <gtk-hst/function.h> HstFunction; HstFunctionClass; typedef Tuple; typedef PointList;
"func" gpointer : Read / Write "name" gchararray : Read / Write "nx" gint : Read / Write "range" gpointer : Read / Write "xmax" gdouble : Read / Write "xmin" gdouble : Read / Write "xstep" gdouble : Read / Write
This is an object that wraps a 1D function and a range of validity for that function. The range is defined as an interval of evaluation and the number of points in which the function is evaluated. The range is the basis for defining an axis in a Histogram.
typedef struct _HstFunction HstFunction;
The HstFunction struct contains the following fields. (These fields should be considered read-only. They should never be set by an application.)
double (*func)(double) | A pointer to a 1D function |
int nbin | Number of bins |
gdouble xmin | Minimum value of the X range |
gdouble xmax | Maximum value of the X range |
gdouble step | Step |
gchar *name | Name of the function |
typedef struct _HstFunctionClass HstFunctionClass;
A HstFunction implements three methods which are used to evaluate the function, to return an array of points in order to draw the function
"func"
property"func" gpointer : Read / Write
A pointer to a double Hst1DFunction function that is to be evaluated by HstFunction
"name"
property"name" gchararray : Read / Write
The name of the function.
Default value: "<unnamed>"
"nx"
property"nx" gint : Read / Write
The number of bins in the X axis
Allowed values: [1,999999]
Default value: 10
"range"
property"range" gpointer : Read / Write
The range of the funtion represents any of nx, xmin, xmax. If any of those change, there will be a range-change notification.
"xmax"
property"xmax" gdouble : Read / Write
The maximum value of X definig the range of validity of the function
Default value: 1
"xmin"
property"xmin" gdouble : Read / Write
The minimum value of X definig the range of validity of the function
Default value: 0
"range-changed"
signalvoid user_function (HstFunction *arg0, gpointer user_data) : Run First
This signal is emitted whenever any of the properties that define the range of the histogram change. That applies to nx, xmin or xmax.
|
user data set when the signal handler was connected. |