Classes | Typedefs | Functions
SQVariable.h File Reference
#include "SQDef.h"
#include "SQErrorCodes.h"
#include "SQCommon.h"
#include "SQIntVector.h"
#include "SQStringVector.h"

Go to the source code of this file.

Classes

struct  tagSQ_VariableVector
 
struct  tagSQ_Variable
 

Typedefs

typedef struct tagSQ_VariableVectorSQ_VariableVector
 
typedef struct tagSQ_VariableSQ_Variable
 

Functions

SQ_ErrorCode SQ_GetNumVariablesInVector (SQ_VariableVector pVariables, int *iSize)
 
SQ_ErrorCode SQ_GetVariableFromVector (SQ_VariableVector pVariables, int iIndex, SQ_Variable *pVariable)
 
SQ_ErrorCode SQ_GetVariableName (SQ_Variable pVariable, int iNameID, char *szVariableName, int iBufferLength)
 
SQ_ErrorCode SQ_GetVariableIDs (SQ_Variable pVariable, SQ_IntVector *pVariableIDs)
 
SQ_ErrorCode SQ_IsQualitative (SQ_Variable pVariable, SQ_Bool *bIsQualitative)
 
SQ_ErrorCode SQ_GetQualitativeSettings (SQ_Variable pVariable, SQ_StringVector *pSettings)
 
SQ_ErrorCode SQ_IsLagged (SQ_Variable pVariable, SQ_Bool *bIsLagged)
 
SQ_ErrorCode SQ_HasDynamicLags (SQ_Variable pVariable, SQ_Bool *bHasDynamicLags)
 
SQ_ErrorCode SQ_GetLagSteps (SQ_Variable pVariable, SQ_IntVector *pLagSteps)
 
SQ_ErrorCode SQ_IsXVariable (SQ_Variable pVariable, SQ_Bool *bIsXVariable)
 
SQ_ErrorCode SQ_IsPhaseIterationVariable (SQ_Variable pVariable, SQ_Bool *bIsPhaseIterVariable)
 

Detailed Description

This file list the SQVariable object used in Umetrics SIMCA-Q products.

Typedef Documentation

◆ SQ_Variable

typedef struct tagSQ_Variable * SQ_Variable

The object used to identify a variable.

◆ SQ_VariableVector

The object used to identify a vector of variables. IMPORTANT: Always initialize it to NULL!

Function Documentation

◆ SQ_GetLagSteps()

SQ_ErrorCode SQ_GetLagSteps ( SQ_Variable  pVariable,
SQ_IntVector pLagSteps 
)

Gets the lag steps for the variable.

Parameters
[in]pVariableThe variable to get the name of.
[out]pLagStepsThe lag steps for the variable. The vector must be cleared with SQ_ClearIntVector.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetNumVariablesInVector()

SQ_ErrorCode SQ_GetNumVariablesInVector ( SQ_VariableVector  pVariables,
int *  iSize 
)

Returns the number of variables in the Vector.

Parameters
[in]pVariablesThe VariableVector to get the number of variables from.
[out]iSizeThe number of variables in the Vector.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetQualitativeSettings()

SQ_ErrorCode SQ_GetQualitativeSettings ( SQ_Variable  pVariable,
SQ_StringVector pSettings 
)

Gets the settings for the qualitative variable.

Parameters
[in]pVariableThe variable to get the name of.
[out]pSettingsThe settings, empty if the variable is not qualitative. The vector must be cleared with SQ_ClearStringVector.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetVariableFromVector()

SQ_ErrorCode SQ_GetVariableFromVector ( SQ_VariableVector  pVariables,
int  iIndex,
SQ_Variable pVariable 
)

Gets the variable from a given position in the Vector.

Parameters
[in]pVariablesThe VariableVector to get the variable from.
[in]iIndexThe index in the Vector to get the variable from.
[out]pVariableThe variable requested.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetVariableIDs()

SQ_ErrorCode SQ_GetVariableIDs ( SQ_Variable  pVariable,
SQ_IntVector pVariableIDs 
)

Gets the variable IDs used in the current model/dataset.

Parameters
[in]pVariableThe variable to use.
[out]pVariableIDsThe variable IDs used.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetVariableName()

SQ_ErrorCode SQ_GetVariableName ( SQ_Variable  pVariable,
int  iNameID,
char *  szVariableName,
int  iBufferLength 
)

Gets the name of a variable

Parameters
[in]pVariableThe variable to get the name of.
[in]iNameIDThe ID of the name to get.
[in,out]szVariableNameA buffer to where the name should be stored, UTF-8 encoded. The user is responsible for allocation/deallocation.
[in]iBufferLengthThe size of the buffer.
Returns
Returns SQ_E_OK if success or an error code
See also
SQ_GetVariableIDs

◆ SQ_HasDynamicLags()

SQ_ErrorCode SQ_HasDynamicLags ( SQ_Variable  pVariable,
SQ_Bool bHasDynamicLags 
)

Gets information whether the variable has dynamic lags or not, if so predictions might quire more lagged data if the process is faster then when modeled. Only valid if the variable is from a model

Parameters
[in]pVariableThe variable to get the name of.
[out]bHasDynamicLagsSQ_True if the variable is lagged.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_IsLagged()

SQ_ErrorCode SQ_IsLagged ( SQ_Variable  pVariable,
SQ_Bool bIsLagged 
)

Gets information whether the variable has been lagged or not. Only valid if the variable is from a model.

Parameters
[in]pVariableThe variable to get the name of.
[out]bIsLaggedSQ_True if the variable is lagged.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_IsPhaseIterationVariable()

SQ_ErrorCode SQ_IsPhaseIterationVariable ( SQ_Variable  pVariable,
SQ_Bool bIsPhaseIterVariable 
)

Gets information whether the variable is phase iteration condition or not. Only valid if the variable is from a model.

Parameters
[in]pVariableThe variable to get the information of.
[out]bIsPhaseIterVariableSQ_True if the variable is a phase iteration condition variable.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_IsQualitative()

SQ_ErrorCode SQ_IsQualitative ( SQ_Variable  pVariable,
SQ_Bool bIsQualitative 
)

Gets information whether the variable is qualitative or not.

Parameters
[in]pVariableThe variable to get the name of.
[out]bIsQualitativeSQ_True if the variable is qualitative.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_IsXVariable()

SQ_ErrorCode SQ_IsXVariable ( SQ_Variable  pVariable,
SQ_Bool bIsXVariable 
)

Gets information whether the variable belongs to the X or Y block. Only valid if the variable is from a model.

Parameters
[in]pVariableThe variable to get the name of.
[out]bIsXVariableSQ_True if the variable is an X variable.
Returns
Returns SQ_E_OK if success or an error code

Copyright (C) Sartorius Stedim Data Analytics AB - Generated by Doxygen