Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
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)
 Member Function: Solve.
 

Detailed Description

Definition at line 144 of file IccSolve.cpp.

Constructor & Destructor Documentation

◆ CIccSimpleMatrixSolver()

CIccSimpleMatrixSolver::CIccSimpleMatrixSolver ( )
inline

Definition at line 147 of file IccSolve.cpp.

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.

Definition at line 165 of file IccSolve.cpp.

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
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
bool icMatrixInvert3x3(icFloatNumber *M)
Name: icMatrixInvert3x3.
Definition IccUtil.cpp:391
void icVectorApplyMatrix3x3(icFloatNumber *result, const icFloatNumber *m, const icFloatNumber *v)
Name: icVectorApplyMatrix3x3.
Definition IccUtil.cpp:502

References icMatrixInvert3x3(), and icVectorApplyMatrix3x3().

+ Here is the call graph for this function:

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