Classes | Typedefs | Functions
SQFloatMatrix.h File Reference
#include "SQDef.h"
#include "SQErrorCodes.h"

Go to the source code of this file.

Classes

struct  tagSQ_FloatMatrix
 

Typedefs

typedef struct tagSQ_FloatMatrixSQ_FloatMatrix
 

Functions

SQ_ErrorCode SQ_InitFloatMatrix (SQ_FloatMatrix *pMatrix, int iRow, int iColumn)
 
SQ_ErrorCode SQ_CopyFloatMatrix (SQ_FloatMatrix pInMatrix, SQ_FloatMatrix *pOutMatrix)
 
SQ_ErrorCode SQ_ClearFloatMatrix (SQ_FloatMatrix *pMatrix)
 
SQ_ErrorCode SQ_SetDataInFloatMatrix (SQ_FloatMatrix pMatrix, int iRow, int iColumn, float fVal)
 
SQ_ErrorCode SQ_GetDataFromFloatMatrix (SQ_FloatMatrix pMatrix, int iRow, int iColumn, float *pfVal)
 
SQ_ErrorCode SQ_SetRowDataInFloatMatrix (SQ_FloatMatrix pMatrix, int iRow, const float *pfVals)
 
SQ_ErrorCode SQ_SetColumnDataInFloatMatrix (SQ_FloatMatrix pMatrix, int iColumn, const float *pfVals)
 
SQ_ErrorCode SQ_SetFloatMatrix (SQ_FloatMatrix pMatrix, const float *pfVals)
 
SQ_ErrorCode SQ_GetRowDataFromFloatMatrix (SQ_FloatMatrix pMatrix, int iRow, float *pfVals)
 
SQ_ErrorCode SQ_GetColumnDataFromFloatMatrix (SQ_FloatMatrix pMatrix, int iColumn, float *pfVals)
 
SQ_ErrorCode SQ_GetFloatMatrix (SQ_FloatMatrix pMatrix, float *pfVals)
 
SQ_ErrorCode SQ_GetNumRowsInFloatMatrix (SQ_FloatMatrix pMatrix, int *piNumRows)
 
SQ_ErrorCode SQ_GetNumColumnsInFloatMatrix (SQ_FloatMatrix pMatrix, int *piNumCols)
 
SQ_ErrorCode SQ_TransposeFloatMatrix (SQ_FloatMatrix pMatrix)
 

Detailed Description

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

Typedef Documentation

◆ SQ_FloatMatrix

A float matrix that is used to get and send data to many functions. Index base = 1. IMPORTANT: Always initialize it to NULL!

Function Documentation

◆ SQ_ClearFloatMatrix()

SQ_ErrorCode SQ_ClearFloatMatrix ( SQ_FloatMatrix pMatrix)

Removes the matrix, this function must be called for every matrix that has been initialized with SQ_InitFloatMatrix.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to be removed.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_CopyFloatMatrix()

SQ_ErrorCode SQ_CopyFloatMatrix ( SQ_FloatMatrix  pInMatrix,
SQ_FloatMatrix pOutMatrix 
)

Get a copy of the float matrix

See also
tagSQ_BoolVector
Parameters
[in]pInMatrixThe vector to copy.
[in,out]pOutMatrixThe result vector.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetColumnDataFromFloatMatrix()

SQ_ErrorCode SQ_GetColumnDataFromFloatMatrix ( SQ_FloatMatrix  pMatrix,
int  iColumn,
float *  pfVals 
)

Gets the data from a given column.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to get the data from.
[in]iColumnThe column to get the data from.
[in]pfValsThe data in given column. Must be of same length as number of rows
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetDataFromFloatMatrix()

SQ_ErrorCode SQ_GetDataFromFloatMatrix ( SQ_FloatMatrix  pMatrix,
int  iRow,
int  iColumn,
float *  pfVal 
)

Gets the data from a given cell.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to get the data from.
[in]iRowThe row to get the data from.
[in]iColumnThe column to get the data from.
[out]pfValThe data in the cell. A pointer to where the data should be stored
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetFloatMatrix()

SQ_ErrorCode SQ_GetFloatMatrix ( SQ_FloatMatrix  pMatrix,
float *  pfVals 
)

Gets the data from the matrix.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to get the data from.
[out]pfValsA pointer to a matrix to be filled with data from the FloatMatrix. Must be of same size as the FloatMatrix The format is Row 1, Row 2, etc.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetNumColumnsInFloatMatrix()

SQ_ErrorCode SQ_GetNumColumnsInFloatMatrix ( SQ_FloatMatrix  pMatrix,
int *  piNumCols 
)

Returns the number of columns in the matrix.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to get the number of columns from.
[out]piNumColsThe number of columns in the matrix.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetNumRowsInFloatMatrix()

SQ_ErrorCode SQ_GetNumRowsInFloatMatrix ( SQ_FloatMatrix  pMatrix,
int *  piNumRows 
)

Returns the number of rows in the matrix.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to get the number of rows from.
[out]piNumRowsThe number of rows in the matrix.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetRowDataFromFloatMatrix()

SQ_ErrorCode SQ_GetRowDataFromFloatMatrix ( SQ_FloatMatrix  pMatrix,
int  iRow,
float *  pfVals 
)

Gets the data from a given row.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to get the data from.
[in]iRowThe row to get the data from.
[out]pfValsThe data in given row. Must be of same length as number of columns
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_InitFloatMatrix()

SQ_ErrorCode SQ_InitFloatMatrix ( SQ_FloatMatrix pMatrix,
int  iRow,
int  iColumn 
)

Initialize a float matrix with its size.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to be initialized.
[in]iRowNumber of rows to give the matrix.
[in]iColumnNumber of columns to give the matrix.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_SetColumnDataInFloatMatrix()

SQ_ErrorCode SQ_SetColumnDataInFloatMatrix ( SQ_FloatMatrix  pMatrix,
int  iColumn,
const float *  pfVals 
)

Sets the data in the given column.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to set the data in.
[in]iColumnThe column to set the data in.
[in]pfValsAn array of data to set the column with. Must be of same length as number of rows
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_SetDataInFloatMatrix()

SQ_ErrorCode SQ_SetDataInFloatMatrix ( SQ_FloatMatrix  pMatrix,
int  iRow,
int  iColumn,
float  fVal 
)

Sets the data in the given cell.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to set the data in.
[in]iRowThe row to set the data in.
[in]iColumnThe column to set the data in.
[in]fValThe data to set the cell with.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_SetFloatMatrix()

SQ_ErrorCode SQ_SetFloatMatrix ( SQ_FloatMatrix  pMatrix,
const float *  pfVals 
)

Sets the data in the matrix.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to set the data in.
[in]pfValsA matrix of data to fill the FloatMatrix. Must be of same size as the FloatMatrix. The format is Row 1, Row 2, etc.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_SetRowDataInFloatMatrix()

SQ_ErrorCode SQ_SetRowDataInFloatMatrix ( SQ_FloatMatrix  pMatrix,
int  iRow,
const float *  pfVals 
)

Sets the data in the given row.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to set the data in.
[in]iRowThe row to set the data in.
[in]pfValsAn array of data to set the row with. Must be of same length as number of columns
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_TransposeFloatMatrix()

SQ_ErrorCode SQ_TransposeFloatMatrix ( SQ_FloatMatrix  pMatrix)

Transpose the matrix. This can only be done if the float matrix does not come from a VectorData object. If it is from a VectorData object, it must be extracted with the GetDataMatrixCopy function.

See also
tagSQ_FloatMatrix
Parameters
[in]pMatrixThe matrix to transpose.
Returns
Returns SQ_E_OK if success or an error code

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