IccMAX 2.1.27
Color Profile Tools
Loading...
Searching...
No Matches
CIccSimpleMatrixSolver Class Reference
+ Inheritance diagram for CIccSimpleMatrixSolver:
+ Collaboration diagram for CIccSimpleMatrixSolver:

Public Member Functions

 CIccSimpleMatrixSolver ()
 
virtual bool Solve (icFloatNumber *dXVector, const icFloatNumber *dMatrix, const icFloatNumber *dYVector, icUInt16Number nRows, icUInt16Number nCols)
 

Detailed Description

Constructor & Destructor Documentation

◆ CIccSimpleMatrixSolver()

CIccSimpleMatrixSolver::CIccSimpleMatrixSolver ( )
inline
147{}

Member Function Documentation

◆ Solve()

virtual bool CIccSimpleMatrixSolver::Solve ( icFloatNumber dXVector,
const icFloatNumber dMatrix,
const icFloatNumber dYVector,
icUInt16Number  nRows,
icUInt16Number  nCols 
)
inlinevirtual

Member Function: Solve

Purpose: Solve for x in the matrix/vector equation y=Mx when M is 3x3 matrix Otherwise return false.

Parameters: -dMatrix is a matrix (M) with nRows x nCols entries in RowOrder -dYVector is a column vector (y) with nRows entries -dXVecotr is a column vector (x) with nCols entries

Return: true if solution was found or false if solution not possible/supported.

Implements IIccMatrixSolver.

166 {
167 if (nRows==3 && nCols==3) {
168 icFloatNumber mtx[9];
169 memcpy(mtx, dMatrix, 9*sizeof(icFloatNumber));
170 bool bInvertible = icMatrixInvert3x3(mtx);
171 if (bInvertible)
172 icVectorApplyMatrix3x3(dXVector, mtx, dYVector);
173 else
174 memset(dXVector, 0, nCols*sizeof(icFloatNumber));
175
176 return bInvertible;
177 }
178
179 return false;
180 }
float icFloatNumber
Definition IccDefs.h:101
ICCPROFLIB_API void icVectorApplyMatrix3x3(icFloatNumber *result, const icFloatNumber *m, const icFloatNumber *v)
Definition IccUtil.cpp:502
ICCPROFLIB_API bool icMatrixInvert3x3(icFloatNumber *matrix)
Definition IccUtil.cpp:391

References icMatrixInvert3x3(), and icVectorApplyMatrix3x3().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: