Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
IccSolve.h
Go to the documentation of this file.
1/** @file
2File: IccSolve.h
3
4Contains: Header for implementation Matrix Solve functionality
5
6Version: V1
7
8Copyright: (c) see ICC Software License
9*/
10
11/*
12 * The ICC Software License, Version 0.1
13 *
14 *
15 * Copyright (c) 2003-2006 The International Color Consortium. All rights
16 * reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 *
22 * 1. Redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer.
24 *
25 * 2. Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in
27 * the documentation and/or other materials provided with the
28 * distribution.
29 *
30 * 3. In the absence of prior written permission, the names "ICC" and "The
31 * International Color Consortium" must not be used to imply that the
32 * ICC organization endorses or promotes products derived from this
33 * software.
34 *
35 *
36 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39 * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
40 * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47 * SUCH DAMAGE.
48 * ====================================================================
49 *
50 * This software consists of voluntary contributions made by many
51 * individuals on behalf of the The International Color Consortium.
52 *
53 *
54 * Membership in the ICC is encouraged when this software is used for
55 * commercial purposes.
56 *
57 *
58 * For more information on The International Color Consortium, please
59 * see <http://www.color.org/>.
60 *
61 *
62 */
63
64//////////////////////////////////////////////////////////////////////
65// HISTORY:
66//
67// -April 12, 2016
68// Initial CIccSolve development
69//
70//////////////////////////////////////////////////////////////////////
71
72#ifndef _ICCSOLVE_H
73#define _ICCSOLVE_H
74
75#include "IccDefs.h"
76
77/**
78****************************************************************************
79* Structure: IIccMatrixSolver
80*
81* Purpose: Define an interface for allowing external implementation of
82* matrix inversion
83*****************************************************************************
84*/
86{
87public:
88 /**
89 ****************************************************************************
90 * Member Function: Solve
91 *
92 * Purpose: Solve for x in the matrix/vector equation y=Mx
93 *
94 * Parameters:
95 * -dMatrix is a matrix (M) with nRows x nCols entries
96 * -dYVector is a column vector (y) with nRows entries
97 * -dXVecotr is a column vector (x) with nCols entries
98 *
99 * Return:
100 * true if solution was found or false if solution not possible.
101 *****************************************************************************
102 */
103 virtual bool Solve(icFloatNumber *dXVector, const icFloatNumber *dMatrix, const icFloatNumber *dYVector, icUInt16Number nRows, icUInt16Number nCols)=0;
104};
105
106/**
107****************************************************************************
108* Global Variable: g_pIccMatrixSolver
109*
110* Purpose: Keep tracks of pointer to matrix solver object. This object
111* should be instantiated before making calls to CIccMpeCalculator. If this
112* variable is not set then the SOLV operator will return a zero vector with
113* with the status of false.
114*****************************************************************************
115*/
117
118/**
119****************************************************************************
120* Function: IccSetMatrixSolver(IIccMatrixSolver *pSolver)
121*
122* Purpose:
123* Global function that can be used by a supporting application to
124* establish an implementation of a matrix solver object.
125*****************************************************************************
126*/
128
129/**
130****************************************************************************
131* Function: icGetDefaultSolver(IIccMatrixSolver *pSolver)
132*
133* Purpose:
134* Global function that can be used by a supporting application to
135* determine the matrix solver object.
136*****************************************************************************
137*/
139
140/**
141****************************************************************************
142* Structure: IIccMatrixInverter
143*
144* Purpose: Define an interface for allowing external implementation of
145* matrix inversion
146*****************************************************************************
147*/
149{
150public:
151 /**
152 ****************************************************************************
153 * Member Function: Invert
154 *
155 * Purpose: Invert a square matrix
156 *
157 * Parameters:
158 * -dMatrix is a matrix (M) with nRows x nCols entries
159 * -nRows is number of rows in matrix
160 * -nCols is number of columns in matrix
161 *
162 * Return:
163 * true if matrix was inverted or false if not possible.
164 *****************************************************************************
165 */
166 virtual bool Invert(icFloatNumber *dMatrix, icUInt16Number nRows, icUInt16Number nCols) = 0;
167};
168
169/**
170****************************************************************************
171* Global Variable: g_pIccMatrixInverter
172*
173* Purpose: Keep tracks of pointer to matrix inverter object.
174*****************************************************************************
175*/
177
178/**
179****************************************************************************
180* Function: IccSetMatrixInverter(IIccMatrixInverter *pInverter)
181*
182* Purpose:
183* Global function that can be used by a supporting application to
184* establish an implementation of a matrix inverter object.
185*****************************************************************************
186*/
188
189/**
190****************************************************************************
191* Function: icGetDefaultInverter(IIccMatrixInverter *pInverter)
192*
193* Purpose:
194* Global function that can be used by a supporting application to
195* determine the matrix solver object.
196*****************************************************************************
197*/
199
200#endif //_ICCSOLVE_H
201
File: IccDefs.h
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
#define ICCPROFLIB_API
IIccMatrixInverter * g_pIccMatrixInverter
Global Variable: g_pIccMatrixInverter.
Definition IccSolve.cpp:259
IIccMatrixInverter * IccGetDefaultMatrixInverter()
Function: icGetDefaultInverter(IIccMatrixInverter *pInverter)
Definition IccSolve.cpp:287
void IccSetMatrixInverter(IIccMatrixInverter *pInverter)
Function: IccSetMatrixInverter(IIccMatrixInverter *pInverter)
Definition IccSolve.cpp:272
void IccSetMatrixSolver(IIccMatrixSolver *pSolver)
Function: IccSetMatrixSolver(IIccMatrixSolver *pSolver)
Definition IccSolve.cpp:201
IIccMatrixSolver * g_pIccMatrixSolver
Global Variable: g_pIccMatrixSolver.
Definition IccSolve.cpp:186
IIccMatrixSolver * IccGetDefaultMatrixSolver()
Function: icGetDefaultSolver(IIccMatrixSolver *pSolver)
Definition IccSolve.cpp:216
Structure: IIccMatrixInverter.
Definition IccSolve.h:149
virtual bool Invert(icFloatNumber *dMatrix, icUInt16Number nRows, icUInt16Number nCols)=0
Member Function: Invert.
Structure: IIccMatrixSolver.
Definition IccSolve.h:86
virtual bool Solve(icFloatNumber *dXVector, const icFloatNumber *dMatrix, const icFloatNumber *dYVector, icUInt16Number nRows, icUInt16Number nCols)=0
Member Function: Solve.
unsigned short icUInt16Number