RAVE
rave_qitotal.h File Reference

Implementation of the QI-total algorithm. More...

#include "rave_object.h"
#include "raveobject_list.h"
#include "rave_field.h"

Go to the source code of this file.

Typedefs

typedef struct _RaveQITotal_t RaveQITotal_t
 Defines QI total.
 

Functions

void RaveQITotal_setDatatype (RaveQITotal_t *self, RaveDataType dtype)
 The data type to use for the resulting field.
 
RaveDataType RaveQITotal_getDatatype (RaveQITotal_t *self)
 
int RaveQITotal_setGain (RaveQITotal_t *self, double gain)
 The gain to use for the resulting field.
 
double RaveQITotal_getGain (RaveQITotal_t *self)
 
void RaveQITotal_setOffset (RaveQITotal_t *self, double offset)
 The offset to use for the resulting field.
 
double RaveQITotal_getOffset (RaveQITotal_t *self)
 
int RaveQITotal_setWeight (RaveQITotal_t *self, const char *howtask, double w)
 Sets the weight for the specified how/task.
 
int RaveQITotal_getWeight (RaveQITotal_t *self, const char *howtask, double *w)
 Returns the weight for the specified how/task.
 
void RaveQITotal_removeWeight (RaveQITotal_t *self, const char *howtask)
 Removes the weight for the specified how/task.
 
RaveField_tRaveQITotal_multiplicative (RaveQITotal_t *self, RaveObjectList_t *fields)
 Performs the multiplicative QI total algorithm.
 
RaveField_tRaveQITotal_additive (RaveQITotal_t *self, RaveObjectList_t *fields)
 Performs the additive QI total algorithm.
 
RaveField_tRaveQITotal_minimum (RaveQITotal_t *self, RaveObjectList_t *fields)
 Performs the minimum QI total algorithm.
 

Variables

RaveCoreObjectType RaveQITotal_TYPE
 Type definition to use when creating a rave object.
 

Detailed Description

Implementation of the QI-total algorithm.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2014-02-27

Typedef Documentation

◆ RaveQITotal_t

typedef struct _RaveQITotal_t RaveQITotal_t

Defines QI total.

Function Documentation

◆ RaveQITotal_additive()

RaveField_t * RaveQITotal_additive ( RaveQITotal_t * self,
RaveObjectList_t * fields )

Performs the additive QI total algorithm.

The weights that are specified for the additive algorithm is the old traditional weighting. I.e., the total sum of the weights are summed. Then each weight is dividied by this sum so that we get a total weight of 1.0. These weights are in turn used on respective field. If a field does not have a weight set, then a default weight will be used for this field which is 1/number of fields.

Parameters
[in]self- self
[in]fields- the quality fields to add

◆ RaveQITotal_getDatatype()

RaveDataType RaveQITotal_getDatatype ( RaveQITotal_t * self)
Parameters
[in]self- self
Returns
the data type

◆ RaveQITotal_getGain()

double RaveQITotal_getGain ( RaveQITotal_t * self)
Parameters
[in]self- self
Returns
the gain

◆ RaveQITotal_getOffset()

double RaveQITotal_getOffset ( RaveQITotal_t * self)
Parameters
[in]self- self
Returns
the offset

◆ RaveQITotal_getWeight()

int RaveQITotal_getWeight ( RaveQITotal_t * self,
const char * howtask,
double * w )

Returns the weight for the specified how/task.

Parameters
[in]self- self
[in]howtaskthe how/task name for the field
[out]wthe weight for specified how/task.
Returns
1 if the how/task could be found, otherwise 0

◆ RaveQITotal_minimum()

RaveField_t * RaveQITotal_minimum ( RaveQITotal_t * self,
RaveObjectList_t * fields )

Performs the minimum QI total algorithm.

Parameters
[in]self- self
[in]fields- the quality fields to test for min

◆ RaveQITotal_multiplicative()

RaveField_t * RaveQITotal_multiplicative ( RaveQITotal_t * self,
RaveObjectList_t * fields )

Performs the multiplicative QI total algorithm.

Parameters
[in]self- self
[in]fields- the quality fields to multiply

◆ RaveQITotal_removeWeight()

void RaveQITotal_removeWeight ( RaveQITotal_t * self,
const char * howtask )

Removes the weight for the specified how/task.

Parameters
[in]self- self
[in]howtas- the how/task name for the field

◆ RaveQITotal_setDatatype()

void RaveQITotal_setDatatype ( RaveQITotal_t * self,
RaveDataType dtype )

The data type to use for the resulting field.

Parameters
[in]self- self
[in]dtype- the data type

◆ RaveQITotal_setGain()

int RaveQITotal_setGain ( RaveQITotal_t * self,
double gain )

The gain to use for the resulting field.

Parameters
[in]self- self
[in]gain- the gain

◆ RaveQITotal_setOffset()

void RaveQITotal_setOffset ( RaveQITotal_t * self,
double offset )

The offset to use for the resulting field.

Parameters
[in]self- self
[in]offset- the offset

◆ RaveQITotal_setWeight()

int RaveQITotal_setWeight ( RaveQITotal_t * self,
const char * howtask,
double w )

Sets the weight for the specified how/task.

The weights are used differently for the different algorithms, please look at the corresponding function on how the weights are used.

Parameters
[in]howtaskthe how/task name for the field
[in]wthe weight, must be >= 0 and preferably below 1.0.
Returns
1 if the how/task - weight could be defined, otherwise 0

Variable Documentation

◆ RaveQITotal_TYPE

RaveCoreObjectType RaveQITotal_TYPE
extern

Type definition to use when creating a rave object.