HstGraph

HstGraph — Represents a function by a sample of its values

Synopsis


#include <gtk-hst/graph.h>


                    HstGraph;
                    HstGraphClass;
HstGraph*           hst_graph_new                       (int n,
                                                         double *x,
                                                         double *y);
void                hst_graph_reset                     (HstGraph *,
                                                         int n,
                                                         double *x,
                                                         double *y);


Object Hierarchy


  GObject
   +----HstFunction
         +----HstGraph

Properties


  "xv"                       gpointer              : Read / Write
  "yv"                       gpointer              : Read / Write

Description

This object is very similar to HstFunction but instead of a function it stores a sampling of the values of a function. The function is therefore evaluated by interpolation, instead of real evaluation.

Details

HstGraph

typedef struct _HstGraph HstGraph;


HstGraphClass

typedef struct {
    HstFunctionClass parent_class;

    /* Methods */
    
    /* signals */
} HstGraphClass;


hst_graph_new ()

HstGraph*           hst_graph_new                       (int n,
                                                         double *x,
                                                         double *y);

Creates a new HstGraph

n :

number of (x,y) pairs

x :

array with values of X

y :

array with values of Y

Returns :

a HstGraph

hst_graph_reset ()

void                hst_graph_reset                     (HstGraph *,
                                                         int n,
                                                         double *x,
                                                         double *y);

Changes the number of points and their values to the ones given at the input. Note: the values are copied into the internal buffers.

Param1 :

n :

number of (x,y) pairs

x :

array with values of X

y :

array with values of Y

Property Details

The "xv" property

  "xv"                       gpointer              : Read / Write

Pointer to abscisas.


The "yv" property

  "yv"                       gpointer              : Read / Write

Pointer to values.

See Also

HstFunction