26 unsigned int cTotalSize = cRows * cCols;
30 m_pElements =
new Coord[cTotalSize];
33#ifdef USE_MK_EXCEPTIONS
36 throw _com_error(E_OUTOFMEMORY);
47 unsigned int cTotalSize = cRows * cCols;
51 m_pElements =
new Coord[cTotalSize];
54#ifdef USE_MK_EXCEPTIONS
57 throw _com_error(E_OUTOFMEMORY);
64 for (
unsigned int i = 0 ; i < (cRows * cCols) ; i++)
65 m_pElements[i] = initializeTo;
75 m_pElements =
new Coord[cTotalSize];
78#ifdef USE_MK_EXCEPTIONS
81 throw _com_error(E_OUTOFMEMORY);
88 for (
unsigned int i = 0 ; i < cTotalSize ; i++)
105template <
class Coord>
111template <
class Coord>
114 return m_pElements [j + (i * m_cCols)];
117template <
class Coord>
120 for (
unsigned int i = 0, cCount = m_cRows * m_cCols ; i < cCount ; i++)
121 m_pElements[i] = initializeTo;
124template <
class Coord>
127 if ((m_cRows != 0) || (m_cRows != m_cCols))
130 for (
unsigned int i = 0 ; i < m_cRows ; i++)
131 for (
unsigned int j = 0 ; j <= i ; j++)
132 if ((i != j) && (Get(i,j) != -Get(j,i)))
134 else if ((i == j) && (Get(i,i) != 0))
140template <
class Coord>
143 if ((m_cRows == 0) || (m_cCols != m_cRows))
146 for (
unsigned int i = 0 ; i < m_cRows ; i++)
147 for (
unsigned int j = 0 ; j < m_cCols ; j++)
148 if ((i != j) && (Get(i,j) != 0))
154template <
class Coord>
157 if ((m_cRows == 0) || (m_cCols != m_cRows))
160 Coord
val = Get(0,0);
162 for (
unsigned int i = 0 ; i < m_cRows ; i++)
163 for (
unsigned int j = 0 ; j < m_cCols ; j++)
164 if (((i != j) && (Get(i,j) != 0))
166 ((i == j) && (Get(i,j) !=
val)))
172template <
class Coord>
175 return ((m_cRows != 0) && (m_cRows == m_cCols));
178template <
class Coord>
181 if ((m_cRows == 0) || (m_cRows != m_cCols))
184 for (
unsigned int i = 0 ; i < m_cRows ; i++)
185 for (
unsigned int j = 0 ; j <= i ; j++)
186 if (Get(i,j) != Get(j,i))
192template <
class Coord>
198template <
class Coord>
201 unsigned int cTotalSize = cRows * cCols;
205 delete[] m_pElements;
210 m_pElements =
new Coord[cTotalSize];
213#ifdef USE_MK_EXCEPTIONS
216 throw _com_error(E_OUTOFMEMORY);
226template <
class Coord>
229 unsigned int cTotalSize = cRows * cCols;
233 delete[] m_pElements;
238 m_pElements =
new Coord[cTotalSize];
241#ifdef USE_MK_EXCEPTIONS
244 throw _com_error(E_OUTOFMEMORY);
253 for (
unsigned int i = 0 ; i < cTotalSize ; i++)
254 m_pElements[i] = initializeTo;
259template <
class Coord>
266 delete[] m_pElements;
271 m_pElements =
new Coord[cTotalSize];
274#ifdef USE_MK_EXCEPTIONS
277 throw _com_error(E_OUTOFMEMORY);
286 for (
unsigned int i = 0 ; i < cTotalSize ; i++)
293template <
class Coord>
297#ifdef USE_MK_EXCEPTIONS
300 throw _com_error(E_INVALIDARG);
303 for (
unsigned int i = 0, cCount = m_cRows * m_cCols ; i < cCount ; i++)
309template <
class Coord>
313#ifdef USE_MK_EXCEPTIONS
316 throw _com_error(E_INVALIDARG);
319 for (
unsigned int i = 0, cCount = m_cRows * m_cCols ; i < cCount ; i++)
325template <
class Coord>
328 for (
unsigned int i = 0, cCount = m_cRows * m_cCols ; i < cCount ; i++)
334template <
class Coord>
337 if (s == ((Coord) 0.0f))
338#ifdef USE_MK_EXCEPTIONS
341 throw _com_error(E_INVALIDARG);
344 for (
unsigned int i = 0, cCount = m_cRows * m_cCols ; i < cCount ; i++)
350template <
class Coord>
353 if ((iRow >= m_cRows) || (iCol >= m_cCols))
354#ifdef USE_MK_EXCEPTIONS
357 throw _com_error(E_INVALIDARG);
360 return m_pElements[iCol + (m_cCols * iRow)];
363template <
class Coord>
366 if ((iRow >= m_cRows) || (iCol >= m_cCols))
367#ifdef USE_MK_EXCEPTIONS
370 throw _com_error(E_INVALIDARG);
373 return m_pElements[iCol + (m_cCols * iRow)];
378template <
class Coord>
386 for (
unsigned int i = 0, cCount = A.
m_cRows * A.
m_cCols ; i < cCount ; i++)
393template <
class Coord>
401 for (
unsigned int i = 0, cCount = A.
m_cRows * A.
m_cCols ; i < cCount ; i++)
408template <
class Coord>
411 unsigned int cRows = A.
m_cRows,
415#ifdef USE_MK_EXCEPTIONS
418 throw _com_error(E_INVALIDARG);
428template <
class Coord>
431 unsigned int cRows = A.
m_cRows,
435#ifdef USE_MK_EXCEPTIONS
438 throw _com_error(E_INVALIDARG);
448template <
class Coord>
451 unsigned int m (A.
Rows()),
460#ifdef USE_MK_EXCEPTIONS
463 throw _com_error(E_INVALIDARG);
468 for (i = 0 ; i < m ; i++)
469 for (j = 0 ; j < n ; j++)
471 fTotal = (Coord) 0.0f;
473 for (k = 0 ; k < p ; k++)
474 fTotal += A(i,k) * B(k,j);
482template <
class Coord>
487 for (
unsigned int i = 0, cCount = M.
m_cRows * M.
m_cCols ; i < cCount ; i++)
493template <
class Coord>
498 for (
unsigned int i = 0, cCount = M.
m_cRows * M.
m_cCols ; i < cCount ; i++)
504template <
class Coord>
507 if (s == ((Coord) 0.0f))
508#ifdef USE_MK_EXCEPTIONS
511 throw _com_error(E_INVALIDARG);
516 for (
unsigned int i = 0, cCount = M.
m_cRows * M.
m_cCols ; i < cCount ; i++)
522template <
class Coord>
532template <
class Coord>
540template <
class Coord>
548#ifdef USE_MK_EXCEPTIONS
551 throw _com_error(E_INVALIDARG);
556 for (
unsigned int i = 0 ; i < cOrder ; i++)
557 I(i,i) = (Coord) 1.0f;
562template <
class Coord>
566#ifdef USE_MK_EXCEPTIONS
569 throw _com_error(E_INVALIDARG);
574 for (
unsigned int i = 0 ; i < cOrder ; i++)
580template <
class Coord>
585 for (
unsigned int i = 0 ; i < M.
m_cRows ; i++)
586 for (
unsigned int j = 0 ; j < M.
m_cCols ; j++)
bool operator==(const GXMatrixMNTC< Coord > &A, const GXMatrixMNTC< Coord > &B)
Definition MatrixMNTC.inl:379
GXMatrixMNTC< Coord > operator-(const GXMatrixMNTC< Coord > &A, const GXMatrixMNTC< Coord > &B)
Definition MatrixMNTC.inl:429
const GXMatrixMNTC< Coord > Identity(Coord cOrder)
Definition MatrixMNTC.inl:542
const GXMatrixMNTC< Coord > ScalarMatrix(unsigned int cOrder, Coord s)
Definition MatrixMNTC.inl:563
GXMatrixMNTC< Coord > operator+(const GXMatrixMNTC< Coord > &A, const GXMatrixMNTC< Coord > &B)
Definition MatrixMNTC.inl:409
bool operator!=(const GXMatrixMNTC< Coord > &A, const GXMatrixMNTC< Coord > &B)
Definition MatrixMNTC.inl:394
GXMatrixMNTC< Coord > operator/(const GXMatrixMNTC< Coord > &M, Coord s)
Definition MatrixMNTC.inl:505
const GXMatrixMNTC< Coord > Transpose(const GXMatrixMNTC< Coord > &M)
Definition MatrixMNTC.inl:581
GXMatrixMNTC< Coord > operator*(const GXMatrixMNTC< Coord > &A, const GXMatrixMNTC< Coord > &B)
Definition MatrixMNTC.inl:449
Definition MatrixMNTC.h:48
const Coord & Get(unsigned int i, unsigned int j) const
Definition MatrixMNTC.inl:112
unsigned int m_cRows
Definition MatrixMNTC.h:112
bool IsDiagonal(void) const
Definition MatrixMNTC.inl:141
void SetDim(unsigned int cRows, unsigned int cCols)
Definition MatrixMNTC.inl:199
unsigned int m_cCols
Definition MatrixMNTC.h:113
unsigned int Cols(void) const
Definition MatrixMNTC.inl:100
const Coord & operator()(unsigned int iRow, unsigned int iCol) const
Definition MatrixMNTC.inl:351
const GXMatrixMNTC< Coord > & operator=(const GXMatrixMNTC< Coord > &toCopy)
Definition MatrixMNTC.inl:260
Coord * m_pElements
Definition MatrixMNTC.h:111
const GXMatrixMNTC< Coord > & operator/=(Coord s)
Definition MatrixMNTC.inl:335
bool IsSquare(void) const
Definition MatrixMNTC.inl:173
const GXMatrixMNTC< Coord > & operator+=(const GXMatrixMNTC< Coord > &toAdd)
Definition MatrixMNTC.inl:294
void Init(const Coord &initializeTo)
Definition MatrixMNTC.inl:118
Coord * Data(void)
Definition MatrixMNTC.inl:106
~GXMatrixMNTC(void)
Definition MatrixMNTC.inl:93
unsigned int Rows(void) const
Definition MatrixMNTC.inl:193
bool IsAntiSymmetric(void) const
Definition MatrixMNTC.inl:125
GXMatrixMNTC(void)
Definition MatrixMNTC.inl:17
const GXMatrixMNTC< Coord > & operator-=(const GXMatrixMNTC< Coord > &toAdd)
Definition MatrixMNTC.inl:310
const GXMatrixMNTC< Coord > & operator*=(Coord s)
Definition MatrixMNTC.inl:326
bool IsSymmetric(void) const
Definition MatrixMNTC.inl:179
bool IsScalar(void) const
Definition MatrixMNTC.inl:155
Definition MatrixMNTC.h:34
int val
Definition jpeglib.h:956