CpgMonitor

CpgMonitor — Property value monitor

Synopsis

#define             CPG_MONITOR_CONST                   (obj)
struct              CpgMonitor;
struct              CpgMonitorClass;
CpgMonitor *        cpg_monitor_new                     ();
const gdouble *     cpg_monitor_get_sites               (CpgMonitor *monitor,
                                                         guint *size);
const gdouble *     cpg_monitor_get_data                (CpgMonitor *monitor,
                                                         guint *size);
gboolean            cpg_monitor_get_data_resampled      (CpgMonitor *monitor,
                                                         const gdouble *sites,
                                                         guint size,
                                                         gdouble *ret);
CpgProperty *       cpg_monitor_get_property            (CpgMonitor *monitor);
                    CpgMonitorPrivate;

Object Hierarchy

  GObject
   +----CpgMonitor

Properties

  "network"                  CpgNetwork*           : Read / Write / Construct Only
  "property"                 CpgProperty*          : Read / Write / Construct Only

Description

A CpgMonitor can be used to monitor the value of a certain CpgProperty while simulating. The monitor will collect the value of the property at each simulation step and provides methods to access these values. Particularly useful is cpg_monitor_get_data_resampled which retrieves the data resampled at specific times.

Details

CPG_MONITOR_CONST()

#define CPG_MONITOR_CONST(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), CPG_TYPE_MONITOR, CpgMonitor const))


struct CpgMonitor

struct CpgMonitor;


struct CpgMonitorClass

struct CpgMonitorClass {
};


cpg_monitor_new ()

CpgMonitor *        cpg_monitor_new                     ();

Create a new monitor for monitoring property property.

Returns :

a new CpgMonitor

cpg_monitor_get_sites ()

const gdouble *     cpg_monitor_get_sites               (CpgMonitor *monitor,
                                                         guint *size);

Returns the data sites as monitored during the simulation. See also cpg_monitor_get_data_resampled for retrieving a resampled version of the monitor data

monitor :

a CpgMonitor

size :

return value for number of values. [out caller-allocates]

Returns :

internal array of monitored sites. The pointer should not be freed. [array type=double length=size]

cpg_monitor_get_data ()

const gdouble *     cpg_monitor_get_data                (CpgMonitor *monitor,
                                                         guint *size);

Returns the data as monitored during the simulation. See also cpg_monitor_get_data_resampled for retrieving a resampled version of the monitor data

monitor :

a CpgMonitor

size :

return value for number of values. [out caller-allocates]

Returns :

internal array of monitored values. The pointer should not be freed. [array type=double length=size]

cpg_monitor_get_data_resampled ()

gboolean            cpg_monitor_get_data_resampled      (CpgMonitor *monitor,
                                                         const gdouble *sites,
                                                         guint size,
                                                         gdouble *ret);

Returns the data as monitored during the simulation, but resampled at specific data sites. ret will have to be already allocated and large enough to hold size values.

monitor :

a CpgMonitor

sites :

the data sites at which to resample the data. [array type=double length=size]

size :

the size of the data sites array

ret :

the return location for the resampled data. [out callee-allocates]

Returns :

TRUE if ret was successfully filled with data, FALSE otherwise

cpg_monitor_get_property ()

CpgProperty *       cpg_monitor_get_property            (CpgMonitor *monitor);

Returns the property which is being monitored.

monitor :

a CpgMonitor

Returns :

a pointer to the CpgProperty. [transfer none]

CpgMonitorPrivate

typedef struct _CpgMonitorPrivate CpgMonitorPrivate;

Property Details

The "network" property

  "network"                  CpgNetwork*           : Read / Write / Construct Only

Network.


The "property" property

  "property"                 CpgProperty*          : Read / Write / Construct Only

Property.