![]() |
![]() |
![]() |
cpg-network Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#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;
"network" CpgNetwork* : Read / Write / Construct Only "property" CpgProperty* : Read / Write / Construct Only
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.
#define CPG_MONITOR_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CPG_TYPE_MONITOR, CpgMonitor const))
CpgMonitor * cpg_monitor_new ();
Create a new monitor for monitoring property property
.
Returns : |
a new CpgMonitor |
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
|
a CpgMonitor |
|
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] |
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
|
a CpgMonitor |
|
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] |
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.
|
a CpgMonitor |
|
the data sites at which to resample the data. [array type=double length=size] |
|
the size of the data sites array |
|
the return location for the resampled data. [out callee-allocates] |
Returns : |
TRUE if ret was successfully filled with data, FALSE otherwise |
CpgProperty * cpg_monitor_get_property (CpgMonitor *monitor
);
Returns the property which is being monitored.
|
a CpgMonitor |
Returns : |
a pointer to the CpgProperty. [transfer none] |