SQCommon.h
Go to the documentation of this file.
1 /*
2 Copyright (C) Sartorius Stedim Data Analytics AB 2017 -
3 */
4 #ifndef _SQCOMMON_H_
5 #define _SQCOMMON_H_
6 
7 #include "SQDef.h"
8 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #ifdef _WIN32
17 #pragma pack(push, 8)
18 #endif
19 
20 #include "SQErrorCodes.h"
21 #include "SQFloatVector.h"
22 #include "SQIntVector.h"
23 
27  typedef enum SQ_ProductEnum
28  {
29  SQ_SQP=0,
33  } SQ_Product;
34 
38  typedef enum SQ_BoolEnum
39  {
40  SQ_False = 0,
41  SQ_True
42  } SQ_Bool;
43 
48  {
49  SQ_Unscaled_False = 0,
50  SQ_Unscaled_True,
51  SQ_Unscaled_Default
53 
58  {
59  SQ_Backtransformed_False = 0,
60  SQ_Backtransformed_True,
61  SQ_Backtransformed_Default
63 
68  {
69  SQ_Reconstruct_False = 0,
70  SQ_Reconstruct_True,
71  SQ_Reconstruct_Default
73 
78  {
79  SQ_Standardized_False = 0,
80  SQ_Standardized_True,
81  SQ_Standardized_Default
83 
88  {
89  SQ_ResolveHierachical_False = 0,
90  SQ_ResolveHierachical_True,
91  SQ_ResolveHierachical_Default
93 
98  {
99  SQ_Normalized_False = 0,
100  SQ_Normalized_True,
101  SQ_Normalized_Default
103 
108  {
109  SQ_ModelingPowerWeighted_False = 0,
110  SQ_ModelingPowerWeighted_True,
111  SQ_ModelingPowerWeighted_Default
113 
118  {
124 
128  typedef
129  enum SQ_ModelTypeEnum
130  {
146  } SQ_ModelType;
147 
151  typedef
152  enum SQ_WeightTypeEnum
153  {
166  } SQ_WeightType;
167 
171  typedef enum SQ_VariableTypeType {
175  } SQ_VariableType;
176 
180  typedef enum SQ_BlockTypeEnum
181  {
185 
186  /************************************************************************/
187  /* Struct for model options information */
188  /************************************************************************/
189 
193  typedef struct
194  {
199  E_Raw = 0,
200  E_Standardized
201  } eResiduals;
206  enum SQ_R2Type {
207  E_Explained = 0,
208  E_Adjusted
209  } eR2;
215  E_Scaled = 0,
218  E_Rotated
219  } eCoefficients;
224  enum SQ_DModType {
225  E_Normalized = 0,
226  E_Absolute
227  } eDistanceToModel;
230  } SQ_ModelOptions;
231 
235  typedef struct tagSQ_ModelInfo
236  {
243  char modelName[128];
244  char modelTitle[128];
245  char modelTypeName[128];
251  } SQ_ModelInfo;
252 
253  /************************* Initialization functions ***********************************/
254 
255  /* These functions should be called before the first project is opened or created. */
256 
263  SQCEXPORT SQ_ErrorCode SQCDECL SQ_GetLoggingStatus(SQ_Bool *pbStatus);
270  SQCEXPORT SQ_ErrorCode SQCDECL SQ_SetLoggingStatus(SQ_Bool bLogOn);
279  SQCEXPORT SQ_ErrorCode SQCDECL SQ_SetLogFile(const char *szPathName);
288  SQCEXPORT SQ_ErrorCode SQCDECL SQ_GetLogFile(char* szPathName, int iBufferLength);
296  typedef void (SQCDECL *SQ_LogFunction)(const char *szMessage, int iStatus);
303  SQCEXPORT SQ_ErrorCode SQCDECL SQ_SetLogFunction(SQ_LogFunction pFunction);
304 
317  SQCEXPORT SQ_ErrorCode SQCDECL SQ_SetPredictionLogFile(const char *szPathName);
326  SQCEXPORT SQ_ErrorCode SQCDECL SQ_GetPredictionLogFile(char* szPathName, int iBufferLength);
333  typedef void (SQCDECL *SQ_PredictionLogFunction)(int iNumberOfPredictions, int iNumberOfProjectsOpened);
341 
342  /******************************************************************************
343  *
344  * General functions
345  *
346  *******************************************************************************/
353  SQCEXPORT SQ_ErrorCode SQCDECL SQ_GetMissingValue(float* pfVal);
354 
365  SQCEXPORT SQ_ErrorCode SQCDECL SQ_GetVersionNumber(int* iMajorVersion, int* iMinorVersion, int* iBuildNumber, int* iRevisionNumber);
366 
375  SQCEXPORT SQ_ErrorCode SQCDECL SQ_SetOEMPassword(const char* szOEMPassword);
376 
385  SQCEXPORT SQ_ErrorCode SQCDECL SQ_SetLicensePath(const char *szLicensePath);
386 
395  SQCEXPORT SQ_ErrorCode SQCDECL SQ_SetPluginPath(const char *szPluginPath);
396 
397 #ifdef _WIN32
398 
404  SQCEXPORT SQ_ErrorCode SQCDECL SQ_AddPythonPath(const char *szPath);
405 #endif
406 
414  SQCEXPORT SQ_ErrorCode SQCDECL SQ_IsLicenseFileValid(SQ_Bool* bValid);
415 
425  SQCEXPORT SQ_ErrorCode SQCDECL SQ_GetLicenseFileExpireDate(char* szExpireDate, int iLength);
426 
433  SQCEXPORT SQ_ErrorCode SQCDECL SQ_GetLicenseFileProduct(SQ_Product* pSQProduct);
434 
445  SQCEXPORT SQ_ErrorCode SQCDECL SQ_IsProjectValid(const char *szProjectName, const char *szPassword, SQ_Bool* bValid);
446 
460  SQCEXPORT SQ_ErrorCode SQCDECL SQ_UseMultiThreading(SQ_Bool bMultiThread, int iNumProcessors);
461 
462 #ifdef _WIN32
463 #pragma pack(pop)
464 #endif
465 
466 #ifdef __cplusplus
467 }
468 #endif /*__cplusplus*/
469 
470 
471 #endif /* _SQCOMMON_H_ */
SQ_SQP
@ SQ_SQP
Definition: SQCommon.h:29
SQ_TriStateNormalizedState
SQ_TriStateNormalizedState
Definition: SQCommon.h:97
tagSQ_ModelInfo::isBatchLevelModel
SQ_Bool isBatchLevelModel
Definition: SQCommon.h:238
SQ_ModelOptions::bWeighted
SQ_Bool bWeighted
Definition: SQCommon.h:229
SQ_WeightTypeEnum
SQ_WeightTypeEnum
Definition: SQCommon.h:151
SQ_PCA_All
@ SQ_PCA_All
Definition: SQCommon.h:134
SQ_Weight_P
@ SQ_Weight_P
Definition: SQCommon.h:156
SQ_ReconstructState
enum SQ_TriStateReconstructState SQ_ReconstructState
SQ_SetPredictionLogFile
SQ_ErrorCode SQ_SetPredictionLogFile(const char *szPathName)
SQ_ModelOptions::SQ_R2Type
SQ_R2Type
Definition: SQCommon.h:206
SQ_UnDefVariable
@ SQ_UnDefVariable
Definition: SQCommon.h:174
SQ_PLS_DA
@ SQ_PLS_DA
Definition: SQCommon.h:138
SQ_GetVersionNumber
SQ_ErrorCode SQ_GetVersionNumber(int *iMajorVersion, int *iMinorVersion, int *iBuildNumber, int *iRevisionNumber)
SQ_ModelType
enum SQ_ModelTypeEnum SQ_ModelType
SQ_SetLogFile
SQ_ErrorCode SQ_SetLogFile(const char *szPathName)
SQ_Bool
enum SQ_BoolEnum SQ_Bool
SQ_Weight_RX
@ SQ_Weight_RX
Definition: SQCommon.h:158
SQ_UseMultiThreading
SQ_ErrorCode SQ_UseMultiThreading(SQ_Bool bMultiThread, int iNumProcessors)
SQ_MLR
@ SQ_MLR
Definition: SQCommon.h:122
tagSQ_ModelInfo::numberOfXVariables
int numberOfXVariables
Definition: SQCommon.h:248
SQ_XScaledCenterdYScaledUncenterd
@ SQ_XScaledCenterdYScaledUncenterd
Definition: SQCommon.h:121
SQ_GetLogFile
SQ_ErrorCode SQ_GetLogFile(char *szPathName, int iBufferLength)
SQ_OPLS_DA
@ SQ_OPLS_DA
Definition: SQCommon.h:140
SQ_UnDefined
@ SQ_UnDefined
Definition: SQCommon.h:131
tagSQ_ModelInfo
Definition: SQCommon.h:235
SQ_SetLogFunction
SQ_ErrorCode SQ_SetLogFunction(SQ_LogFunction pFunction)
tagSQ_ModelInfo::numberOfYOrthogonalComponents
int numberOfYOrthogonalComponents
Definition: SQCommon.h:242
SQ_ResolveHierachicalState
enum SQ_TriStateResolveHierachicalState SQ_ResolveHierachicalState
SQ_VariableBlock
enum SQ_BlockTypeEnum SQ_VariableBlock
SQ_TriStateReconstructState
SQ_TriStateReconstructState
Definition: SQCommon.h:67
SQ_O2PLS_Class
@ SQ_O2PLS_Class
Definition: SQCommon.h:144
SQ_SetLicensePath
SQ_ErrorCode SQ_SetLicensePath(const char *szLicensePath)
SQ_GetLoggingStatus
SQ_ErrorCode SQ_GetLoggingStatus(SQ_Bool *pbStatus)
tagSQ_ModelInfo::numberOfPredictiveComponents
int numberOfPredictiveComponents
Definition: SQCommon.h:240
SQ_BlockX
@ SQ_BlockX
Definition: SQCommon.h:182
SQ_Product
enum SQ_ProductEnum SQ_Product
SQ_BacktransformedState
enum SQ_TriStateBacktransformedState SQ_BacktransformedState
SQ_WeightType
enum SQ_WeightTypeEnum SQ_WeightType
SQ_OPLS
@ SQ_OPLS
Definition: SQCommon.h:139
SQ_IsLicenseFileValid
SQ_ErrorCode SQ_IsLicenseFileValid(SQ_Bool *bValid)
tagSQ_ModelInfo::modelTitle
char modelTitle[128]
Definition: SQCommon.h:244
tagSQ_ModelInfo::modelTypeName
char modelTypeName[128]
Definition: SQCommon.h:245
SQ_Weight_CoeffCS
@ SQ_Weight_CoeffCS
Definition: SQCommon.h:160
tagSQ_ModelInfo::isBatchEvolutionModel
SQ_Bool isBatchEvolutionModel
Definition: SQCommon.h:239
SQ_OPLS_Class
@ SQ_OPLS_Class
Definition: SQCommon.h:141
SQIntVector.h
SQ_YVariable
@ SQ_YVariable
Definition: SQCommon.h:173
SQ_O2PLS_DA
@ SQ_O2PLS_DA
Definition: SQCommon.h:143
SQ_Weight_PRange
@ SQ_Weight_PRange
Definition: SQCommon.h:164
tagSQ_ModelInfo::modelType
SQ_ModelType modelType
Definition: SQCommon.h:246
tagSQ_ModelInfo::lastModified
long lastModified
Definition: SQCommon.h:247
SQ_PLS_Class
@ SQ_PLS_Class
Definition: SQCommon.h:136
SQ_PCA_Class
@ SQ_PCA_Class
Definition: SQCommon.h:135
SQ_PCA_X
@ SQ_PCA_X
Definition: SQCommon.h:132
tagSQ_ModelInfo::numberOfObservations
int numberOfObservations
Definition: SQCommon.h:250
SQ_PCA_Y
@ SQ_PCA_Y
Definition: SQCommon.h:133
SQ_SetPredictionLogFunction
SQ_ErrorCode SQ_SetPredictionLogFunction(SQ_PredictionLogFunction pFunction)
SQ_SetOEMPassword
SQ_ErrorCode SQ_SetOEMPassword(const char *szOEMPassword)
SQ_PredictionLogFunction
void(* SQ_PredictionLogFunction)(int iNumberOfPredictions, int iNumberOfProjectsOpened)
Definition: SQCommon.h:333
SQ_ProductEnum
SQ_ProductEnum
Definition: SQCommon.h:27
SQ_MOCA
@ SQ_MOCA
Definition: SQCommon.h:145
SQ_CoefficientsRotatedType
enum SQ_CoefficientsRotatedTypeEnum SQ_CoefficientsRotatedType
SQ_IsProjectValid
SQ_ErrorCode SQ_IsProjectValid(const char *szProjectName, const char *szPassword, SQ_Bool *bValid)
SQ_VariableTypeType
SQ_VariableTypeType
Definition: SQCommon.h:171
SQ_XUnscaledCenterdYUnscaledUncenterd
@ SQ_XUnscaledCenterdYUnscaledUncenterd
Definition: SQCommon.h:120
tagSQ_ModelInfo::numberOfXOrthogonalComponents
int numberOfXOrthogonalComponents
Definition: SQCommon.h:241
tagSQ_ModelInfo::modelName
char modelName[128]
Definition: SQCommon.h:243
SQ_Weight_Normalized
@ SQ_Weight_Normalized
Definition: SQCommon.h:154
tagSQ_ModelInfo::isFitted
SQ_Bool isFitted
Definition: SQCommon.h:237
SQ_BoolEnum
SQ_BoolEnum
Definition: SQCommon.h:38
SQ_PLS
@ SQ_PLS
Definition: SQCommon.h:137
SQ_ErrorCode
enum SQ_ErrorCodeEnum SQ_ErrorCode
SQ_TriStateModelingPowerWeightedState
SQ_TriStateModelingPowerWeightedState
Definition: SQCommon.h:107
SQ_TriStateStandardizedState
SQ_TriStateStandardizedState
Definition: SQCommon.h:77
SQ_Weight_PO
@ SQ_Weight_PO
Definition: SQCommon.h:165
tagSQ_ModelInfo::numberOfYVariables
int numberOfYVariables
Definition: SQCommon.h:249
SQ_Weight_WStar
@ SQ_Weight_WStar
Definition: SQCommon.h:157
SQ_TriStateBacktransformedState
SQ_TriStateBacktransformedState
Definition: SQCommon.h:57
SQ_GetLicenseFileProduct
SQ_ErrorCode SQ_GetLicenseFileProduct(SQ_Product *pSQProduct)
SQ_ModelOptions::SQ_CoefficientType
SQ_CoefficientType
Definition: SQCommon.h:214
SQ_ModelOptions::E_MLR
@ E_MLR
Definition: SQCommon.h:216
SQ_ModelOptions::SQ_DModType
SQ_DModType
Definition: SQCommon.h:224
SQ_Weight_RY
@ SQ_Weight_RY
Definition: SQCommon.h:159
SQ_SetLoggingStatus
SQ_ErrorCode SQ_SetLoggingStatus(SQ_Bool bLogOn)
SQFloatVector.h
SQ_TriStateUnscaledState
SQ_TriStateUnscaledState
Definition: SQCommon.h:47
SQ_StandardizedState
enum SQ_TriStateStandardizedState SQ_StandardizedState
SQ_CoefficientsRotatedTypeEnum
SQ_CoefficientsRotatedTypeEnum
Definition: SQCommon.h:117
SQ_Weight_Raw
@ SQ_Weight_Raw
Definition: SQCommon.h:155
SQ_SQM
@ SQ_SQM
Definition: SQCommon.h:31
SQ_BlockTypeEnum
SQ_BlockTypeEnum
Definition: SQCommon.h:180
SQ_GetLicenseFileExpireDate
SQ_ErrorCode SQ_GetLicenseFileExpireDate(char *szExpireDate, int iLength)
SQ_ModelingPowerWeightedState
enum SQ_TriStateModelingPowerWeightedState SQ_ModelingPowerWeightedState
SQ_VariableType
enum SQ_VariableTypeType SQ_VariableType
SQ_ModelTypeEnum
SQ_ModelTypeEnum
Definition: SQCommon.h:128
SQ_LogFunction
void(* SQ_LogFunction)(const char *szMessage, int iStatus)
Definition: SQCommon.h:296
SQ_SQPPlus
@ SQ_SQPPlus
Definition: SQCommon.h:30
SQ_TriStateResolveHierachicalState
SQ_TriStateResolveHierachicalState
Definition: SQCommon.h:87
SQ_Weight_WStarRange
@ SQ_Weight_WStarRange
Definition: SQCommon.h:163
SQErrorCodes.h
SQ_ModelOptions::E_Unscaled
@ E_Unscaled
Definition: SQCommon.h:217
SQ_Weight_VIP
@ SQ_Weight_VIP
Definition: SQCommon.h:162
SQ_SetPluginPath
SQ_ErrorCode SQ_SetPluginPath(const char *szPluginPath)
SQ_ModelInfo
struct tagSQ_ModelInfo SQ_ModelInfo
SQ_XVariable
@ SQ_XVariable
Definition: SQCommon.h:172
SQ_BlockY
@ SQ_BlockY
Definition: SQCommon.h:183
SQ_SQAll
@ SQ_SQAll
Definition: SQCommon.h:32
SQ_NormalizedState
enum SQ_TriStateNormalizedState SQ_NormalizedState
SQ_XYUnscaledUncenterd
@ SQ_XYUnscaledUncenterd
Definition: SQCommon.h:119
SQ_GetMissingValue
SQ_ErrorCode SQ_GetMissingValue(float *pfVal)
SQ_ModelOptions::SQ_ResidualsType
SQ_ResidualsType
Definition: SQCommon.h:198
SQ_O2PLS
@ SQ_O2PLS
Definition: SQCommon.h:142
SQ_Weight_CoeffCSRaw
@ SQ_Weight_CoeffCSRaw
Definition: SQCommon.h:161
SQ_UnscaledState
enum SQ_TriStateUnscaledState SQ_UnscaledState
SQ_GetPredictionLogFile
SQ_ErrorCode SQ_GetPredictionLogFile(char *szPathName, int iBufferLength)
SQ_ModelOptions
Definition: SQCommon.h:193

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