cta_stoch_observer.h File Reference

Interface description of the COSTA default stochastic observer component. For user implementation see cta_usr_stoch_observer.h. More...

#include "cta_system.h"
#include "cta_handles.h"
#include "cta_datatypes.h"
#include "cta_functions.h"
#include "cta_vector.h"
#include "cta_matrix.h"
#include "cta_time.h"
#include "cta_obsdescr.h"

Go to the source code of this file.

Defines

#define CTA_SOBS_CREATE_SIZE   ( 1)
#define CTA_SOBS_CREATE_INIT   ( 2)
#define CTA_SOBS_FREE   ( 3)
#define CTA_SOBS_CREATE_SELECTION   ( 4)
#define CTA_SOBS_COUNT   ( 5)
#define CTA_SOBS_GET_OBS_DESCRIPTION   ( 6)
#define CTA_SOBS_GET_VALUES   ( 7)
#define CTA_SOBS_GET_REALISATION   ( 8)
#define CTA_SOBS_GET_EXPECTATION   ( 9)
#define CTA_SOBS_EVALUATE_PDF   (10)
#define CTA_SOBS_GET_COV_MATRIX   (11)
#define CTA_SOBS_GET_VARIANCE   (12)
#define CTA_SOBS_EXPORT   (13)
#define CTA_SOBS_GET_TIMES   (14)
#define CTA_SOBS_NUMFUNC   (15)

Typedefs

typedef CTA_Handle CTA_StochObs
typedef CTA_Handle CTA_SObsClass

Functions

CTAEXPORT int CTA_SObs_DefineClass (const char *name, const CTA_Func h_func[CTA_SOBS_NUMFUNC], CTA_ObsDescrClass descrcl, CTA_SObsClass *hstochobscl)
 Create a new class (=implementation) of a COSTA stochastic observer component.
CTAEXPORT int CTA_SObs_Create (CTA_SObsClass hstochobscl, CTA_Handle userdata, CTA_StochObs *hstochobs)
 Create an instance of a stocastic observer.
CTAEXPORT int CTA_SObs_CreateSel (CTA_StochObs hsobsin, CTA_Handle userdata, CTA_StochObs *hsobsout)
 Create a new stochastic observer that is subset of existing stochastic observer.
CTAEXPORT int CTA_SObs_CreateTimSel (CTA_StochObs hsobsin, CTA_Time timespan, CTA_StochObs *hsobsout)
 Create a new stoch observer that is subset in time of existing stochastic observer.
CTAEXPORT int CTA_SObs_Count (CTA_StochObs hsobs, int *nmeasr)
 Count the number of elements in stochastic observer.
CTAEXPORT int CTA_SObs_GetVal (CTA_StochObs hsobs, CTA_Vector hvec)
 Get a vector with the measurements.
CTAEXPORT int CTA_SObs_GetTimes (CTA_StochObs hsobs, CTA_Vector hvec)
 Count the times associated to the measurements.
CTAEXPORT int CTA_SObs_GetRealisation (CTA_StochObs hsobs, CTA_Vector hvec)
 Draw random values (measurements) according to the probability density function of the mesurements.
CTAEXPORT int CTA_SObs_GetExpectation (CTA_StochObs hsobs, CTA_Vector hvec)
 Get expectation of the probability density function of the mesurements.
CTAEXPORT int CTA_SObs_EvalPDF (CTA_StochObs hsobs, CTA_Vector hvecx, CTA_Vector hvecy)
 Get the value of the probability density function of the mesurements at given location.
CTAEXPORT int CTA_SObs_GetCovMat (CTA_StochObs hsobs, CTA_Matrix hmat)
 Get covariance matrix of probability density function of the measurements.
CTAEXPORT int CTA_SObs_GetVar (CTA_StochObs hsobs, CTA_Vector hvec)
 Get variance of probability density function of the mesurements.
CTAEXPORT int CTA_SObs_GetStd (CTA_StochObs hsobs, CTA_Vector hvec)
 Get standard deviation of probability density function of the measurements.
CTAEXPORT int CTA_SObs_GetDescription (CTA_StochObs hsobs, CTA_ObsDescr *hobsdescr)
 Create the observation description corresponding to the stochastic observer.
CTAEXPORT int CTA_SObs_Export (CTA_StochObs hsobs, CTA_Handle userdata)
 Export the stochastic observer.
CTAEXPORT int CTA_SObs_Free (CTA_StochObs *hsobs)
 Free the stochastic observer.


Detailed Description

Interface description of the COSTA default stochastic observer component. For user implementation see cta_usr_stoch_observer.h.

Definition in file cta_stoch_observer.h.


Define Documentation

#define CTA_SOBS_COUNT   ( 5)

Definition at line 46 of file cta_stoch_observer.h.

#define CTA_SOBS_CREATE_INIT   ( 2)

Definition at line 43 of file cta_stoch_observer.h.

#define CTA_SOBS_CREATE_SELECTION   ( 4)

Definition at line 45 of file cta_stoch_observer.h.

#define CTA_SOBS_CREATE_SIZE   ( 1)

Definition at line 42 of file cta_stoch_observer.h.

#define CTA_SOBS_EVALUATE_PDF   (10)

Definition at line 51 of file cta_stoch_observer.h.

#define CTA_SOBS_EXPORT   (13)

Definition at line 54 of file cta_stoch_observer.h.

#define CTA_SOBS_FREE   ( 3)

Definition at line 44 of file cta_stoch_observer.h.

#define CTA_SOBS_GET_COV_MATRIX   (11)

Definition at line 52 of file cta_stoch_observer.h.

#define CTA_SOBS_GET_EXPECTATION   ( 9)

Definition at line 50 of file cta_stoch_observer.h.

#define CTA_SOBS_GET_OBS_DESCRIPTION   ( 6)

Definition at line 47 of file cta_stoch_observer.h.

#define CTA_SOBS_GET_REALISATION   ( 8)

Definition at line 49 of file cta_stoch_observer.h.

#define CTA_SOBS_GET_TIMES   (14)

Definition at line 55 of file cta_stoch_observer.h.

#define CTA_SOBS_GET_VALUES   ( 7)

Definition at line 48 of file cta_stoch_observer.h.

#define CTA_SOBS_GET_VARIANCE   (12)

Definition at line 53 of file cta_stoch_observer.h.

#define CTA_SOBS_NUMFUNC   (15)

Definition at line 56 of file cta_stoch_observer.h.


Typedef Documentation

typedef CTA_Handle CTA_SObsClass

Definition at line 37 of file cta_stoch_observer.h.

typedef CTA_Handle CTA_StochObs

Definition at line 36 of file cta_stoch_observer.h.


Function Documentation

CTAEXPORT int CTA_SObs_Count ( CTA_StochObs  hsobs,
int *  nmeasr 
)

Count the number of elements in stochastic observer.

Parameters:
hsobs I handle of the stochastic observer
nmeasr O receives number of measurements in this observer
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_Create ( CTA_SObsClass  hstochobscl,
CTA_Handle  userdata,
CTA_StochObs hstochobs 
)

Create an instance of a stocastic observer.

Parameters:
hstochobscl I stochastic observer class of new stochastic observer
userdata IO userdata for creation (depends on class)
hstochobs O receives handle of new stochastic observer object
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_CreateSel ( CTA_StochObs  hsobsin,
CTA_Handle  userdata,
CTA_StochObs hsobsout 
)

Create a new stochastic observer that is subset of existing stochastic observer.

Parameters:
hsobsin I handle of the existing stochastic observer of which a selection is to be made
userdata IO inputs necessary for making a selection (depends on user implementation)
hsobsout O receives handle of the new COSTA-stochastic observer, empty before calling, caller responsible for freeing after use
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_CreateTimSel ( CTA_StochObs  hsobsin,
CTA_Time  timespan,
CTA_StochObs hsobsout 
)

Create a new stoch observer that is subset in time of existing stochastic observer.

All observations in the closed interval [t1,t2] of the time span are selected.

Parameters:
hsobsin I handle of the stochastic observer of which a selection is to be made
timespan I time span over which selection has to be made
hsobsout O receives handle of the new COSTA-stochastic observer, empty before calling
Returns:
error states: CTA_OK if successful

CTAEXPORT int CTA_SObs_DefineClass ( const char *  name,
const CTA_Func  h_func[CTA_SOBS_NUMFUNC],
CTA_ObsDescrClass  descrcl,
CTA_SObsClass hstochobscl 
)

Create a new class (=implementation) of a COSTA stochastic observer component.

Parameters:
name I name of the new stochastic observer class
h_func I COSTA function handles for functions that implement class, missing functions must have value CTA_NULL
descrcl I class of the observation description that is created by stochastic observer
hstochobscl O handle of new stochastic observer class
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_EvalPDF ( CTA_StochObs  hsobs,
CTA_Vector  hvecx,
CTA_Vector  hvecy 
)

Get the value of the probability density function of the mesurements at given location.

Parameters:
hsobs I handle of the stochastic observer
hvecx I handle of vector with location for evaluating pdf
hvecy IO handle of vector that is to contain the pdf-value; must exist before calling
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_Export ( CTA_StochObs  hsobs,
CTA_Handle  userdata 
)

Export the stochastic observer.

Note:
Supported by CTA_DEFAULT_SOBS:
output to file (userdata must contain handle of COSTA file)
Parameters:
hsobs I handle of the stochastic observer
userdata I configuration of output
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_Free ( CTA_StochObs hsobs  ) 

Free the stochastic observer.

Note:
hsobs=CTA_NULL is allowed
Parameters:
hsobs IO handle of the stochastic observer, replaced by CTA_NULL on return
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_GetCovMat ( CTA_StochObs  hsobs,
CTA_Matrix  hmat 
)

Get covariance matrix of probability density function of the measurements.

Parameters:
hsobs I handle of the stochastic observer
hmat IO handle of matrix that receives the covariance matrix; must exist before calling
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_GetDescription ( CTA_StochObs  hsobs,
CTA_ObsDescr hobsdescr 
)

Create the observation description corresponding to the stochastic observer.

Note:
Caller is responsible for freeing the here created observation description
Parameters:
hsobs I handle of the stochastic observer
hobsdescr O receives handle of newly created observation description class, empty before calling
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_GetExpectation ( CTA_StochObs  hsobs,
CTA_Vector  hvec 
)

Get expectation of the probability density function of the mesurements.

Parameters:
hsobs I handle of the stochastic observer
hvec IO handle of vector that receives the expectation values; must exist before calling
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_GetRealisation ( CTA_StochObs  hsobs,
CTA_Vector  hvec 
)

Draw random values (measurements) according to the probability density function of the mesurements.

Parameters:
hsobs I handle of the stochastic observer
hvec IO handle of vector that receives the draw (measurements); must exist before calling
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_GetStd ( CTA_StochObs  hsobs,
CTA_Vector  hvec 
)

Get standard deviation of probability density function of the measurements.

Parameters:
hsobs I handle of the stochastic observer
hvec IO handle of vector that is to contain the standard deviation
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_GetTimes ( CTA_StochObs  hsobs,
CTA_Vector  hvec 
)

Count the times associated to the measurements.

Parameters:
hsobs I handle of the stochastic observer
hvec IO handle to vector that receives the times; must exist before calling
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_GetVal ( CTA_StochObs  hsobs,
CTA_Vector  hvec 
)

Get a vector with the measurements.

Parameters:
hsobs I handle of the stochastic observer
hvec IO handle of vector that receives the measurements; must exist before calling
Returns:
error status: CTA_OK if successful

CTAEXPORT int CTA_SObs_GetVar ( CTA_StochObs  hsobs,
CTA_Vector  hvec 
)

Get variance of probability density function of the mesurements.

Parameters:
hsobs I handle of the stochastic observer
hvec IO handle of vector that receives the variance; must exist before calling
Returns:
error status: CTA_OK if successful


Generated on Thu Dec 4 17:52:29 2008 for COSTA by  doxygen 1.5.2