class CMatrix
{
public:
CMatrix(int rows=3, int cols=3)
{
ASSERT(rows == cols);
m_nRows = rows;
m_nCols = cols;
W = new double* [m_nRows];
for(int i=0; i < m_nRows; i++)
{
W[i] = new double[m_nCols];
memset(W[i], 0, sizeof(double)*m_nCols);
}
}
~CMatrix()
{
for(int i=0; i < m_nRows; i++)
{
delete [] W[i];
}
delete [] W;
}
public:
double* operator[](LONG index) {
ASSERT(index >= 0 && index < m_nRows);
return W[index];
}
double* operator[](int index) {
ASSERT(index >= 0 && index < m_nRows);
return W[index];
}
double* operator[](short index) {
ASSERT(index >= 0 && index < m_nRows);
return W[index];
}
protected:
int m_nRows;
int m_nCols;
double **W;
};
===================================================================
À§ Ŭ·¡½º¸¦ ImageProcessing.h À§ ºÎºÐ¿¡ º¹»çÇÏ¿© ºÙ¿©³Ö±â ¹Ù¶÷.
¾ÕÀ¸·Î ÇÊÅÍ ¸¶½ºÅ© °è¼ö¸¦ ÃʱâÈÇϴµ¥ »ç¿ë
¾ÕÀ¸·Î °è¼Ó »ç¿ëÇÒ Å¬·¡½ºÀ̹ǷΠ¹Ýµå½Ã ³Ö±â ¹Ù¶÷.
|