230 for (i=0; i<nEntries; i++) {
247 for (r=0; r<(int)
m_nRows; r++) {
249 for (c=0; c<(int)
m_nCols; c++) {
274 for (r=0, e=0; r<(int)
m_nRows; r++) {
279 for (; e<le; e++, ci++) {
300 int fA, fB, nA, nB, offA, offB, iA, iB;
302 for (r=0; r<(int)
m_nRows; r++) {
313 while(i<nA || j<nB) {
363 for (i=0; i<nA; i++) {
373 for (i=0; i<nB; i++) {
396 int fA, fB, nA, nB, offA, offB, iA, iB;
398 for (r=0; r<(int)
m_nRows; r++) {
409 while(i<nA || j<nB) {
459 for (i=0; i<nA; i++) {
469 for (i=0; i<nB; i++) {
486 for (r=0; r<(int)
m_nRows; r++) {
502 return (nMemSize - 4 - 4*(nRows+1) - (nTypeSize-1)) / (nTypeSize+2);
507 icUInt32Number off = ((4 + 4*(nRows+1) + 2*nMaxEntries + (nTypeSize-1))/nTypeSize)*nTypeSize;
508 return off + nTypeSize*nMaxEntries;
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
unsigned int icUInt32Number
bool FillFromFullMatrix(icFloatNumber *pData)
bool Union(const CIccSparseMatrix &mtx1, const CIccSparseMatrix &mtx2)
static icUInt32Number MaxEntries(icUInt32Number nMemSize, icUInt16Number nRows, icUInt8Number nTypeSize)
bool Interp(icFloatNumber d1, const CIccSparseMatrix &mtx1, icFloatNumber d2, const CIccSparseMatrix &mtx2)
icUInt16Number * m_ColumnIndices
IIccSparseMatrixEntry * m_Data
virtual ~CIccSparseMatrix(void)
icUInt8Number * m_pMatrix
bool MultiplyVector(icFloatNumber *pResult, const icFloatNumber *pVector) const
void Reset(void *pMatrix, icUInt32Number nSize, icSparseMatrixType nType, bool bInitFromData=true)
CIccSparseMatrix & operator=(const CIccSparseMatrix &mtx)
bool Copy(const CIccSparseMatrix &mtx)
static icUInt32Number MemSize(icUInt32Number nMaxEntries, icUInt16Number nRows, icUInt8Number nTypeSize)
icSparseMatrixType m_nType
icUInt32Number m_nRawSize
CIccSparseMatrix(void *pMatrix=NULL, icUInt32Number nSize=0, icSparseMatrixType nType=((icSparseMatrixType) 0x0000), bool bInitFromData=false)
icUInt32Number m_nMaxEntries
icUInt16Number * m_RowStart
static icUInt8Number EntrySize(icSparseMatrixType nType)
bool Init(icUInt16Number nRows, icUInt16Number nCols, bool bSetData=false)
virtual void set(int index, icFloatNumber value)=0
virtual icFloatNumber get(int index) const =0
virtual void init(void *pData)=0
virtual icUInt8Number size() const =0