[N_SE-33432] non-sqaure matrix is not set correctly
authordahyeong.kim <dahyeong.kim@samsung.com>
Wed, 10 Apr 2013 02:36:26 +0000 (11:36 +0900)
committerdahyeong.kim <dahyeong.kim@samsung.com>
Wed, 10 Apr 2013 02:55:11 +0000 (11:55 +0900)
Change-Id: I6f0acfb8e738cfe2c4e884fb25054f274fded380
Signed-off-by: dahyeong.kim <dahyeong.kim@samsung.com>
src/base/FBaseDoubleMatrix.cpp
src/base/FBaseFloatMatrix.cpp
src/base/FBaseIntMatrix.cpp

index 1e03362..df65b25 100644 (file)
@@ -73,7 +73,7 @@ DoubleMatrix::DoubleMatrix(int rowCount, int columnCount, const double* pArray,
                        {
                                for (int j = 0; j < __column; j++)
                                {
-                                       __pMatrix[i][j] = pArray[i * __row + j];
+                                       __pMatrix[i][j] = pArray[i * __column + j];
                                }
                        }
                }
@@ -83,7 +83,7 @@ DoubleMatrix::DoubleMatrix(int rowCount, int columnCount, const double* pArray,
                        {
                                for (int j = 0; j < __row; j++)
                                {
-                                       __pMatrix[j][i] = pArray[i * __column + j];
+                                       __pMatrix[j][i] = pArray[i * __row + j];
                                }
                        }
                }
@@ -813,7 +813,7 @@ DoubleMatrix::SetValue(const double* pArray, bool rowMajor)
                {
                        for (int j = 0; j < __column; j++)
                        {
-                               __pMatrix[i][j] = pArray[i * __row + j];
+                               __pMatrix[i][j] = pArray[i * __column + j];
                        }
                }
        }
@@ -823,7 +823,7 @@ DoubleMatrix::SetValue(const double* pArray, bool rowMajor)
                {
                        for (int j = 0; j < __row; j++)
                        {
-                               __pMatrix[j][i] = pArray[i * __column + j];
+                               __pMatrix[j][i] = pArray[i * __row + j];
                        }
                }
        }
index 0ba1c1c..c9f99e8 100644 (file)
@@ -73,7 +73,7 @@ FloatMatrix::FloatMatrix(int rowCount, int columnCount, const float* pArray, boo
                        {
                                for (int j = 0; j < __column; j++)
                                {
-                                       __pMatrix[i][j] = pArray[i * __row + j];
+                                       __pMatrix[i][j] = pArray[i * __column + j];
                                }
                        }
                }
@@ -83,7 +83,7 @@ FloatMatrix::FloatMatrix(int rowCount, int columnCount, const float* pArray, boo
                        {
                                for (int j = 0; j < __row; j++)
                                {
-                                       __pMatrix[j][i] = pArray[i * __column + j];
+                                       __pMatrix[j][i] = pArray[i * __row + j];
                                }
                        }
                }
@@ -812,7 +812,7 @@ FloatMatrix::SetValue(const float* pArray, bool rowMajor)
                {
                        for (int j = 0; j < __column; j++)
                        {
-                               __pMatrix[i][j] = pArray[i * __row + j];
+                               __pMatrix[i][j] = pArray[i * __column + j];
                        }
                }
        }
@@ -822,7 +822,7 @@ FloatMatrix::SetValue(const float* pArray, bool rowMajor)
                {
                        for (int j = 0; j < __row; j++)
                        {
-                               __pMatrix[j][i] = pArray[i * __column + j];
+                               __pMatrix[j][i] = pArray[i * __row + j];
                        }
                }
        }
index 681f957..22a9b64 100644 (file)
@@ -73,7 +73,7 @@ IntMatrix::IntMatrix(int rowCount, int columnCount, const int* pArray, bool rowM
                        {
                                for (int j = 0; j < __column; j++)
                                {
-                                       __pMatrix[i][j] = pArray[i * __row + j];
+                                       __pMatrix[i][j] = pArray[i * __column + j];
                                }
                        }
                }
@@ -83,7 +83,7 @@ IntMatrix::IntMatrix(int rowCount, int columnCount, const int* pArray, bool rowM
                        {
                                for (int j = 0; j < __row; j++)
                                {
-                                       __pMatrix[j][i] = pArray[i * __column + j];
+                                       __pMatrix[j][i] = pArray[i * __row + j];
                                }
                        }
                }
@@ -811,7 +811,7 @@ IntMatrix::SetValue(const int* pArray, bool rowMajor)
                {
                        for (int j = 0; j < __column; j++)
                        {
-                               __pMatrix[i][j] = pArray[i * __row + j];
+                               __pMatrix[i][j] = pArray[i * __column + j];
                        }
                }
        }
@@ -821,7 +821,7 @@ IntMatrix::SetValue(const int* pArray, bool rowMajor)
                {
                        for (int j = 0; j < __row; j++)
                        {
-                               __pMatrix[j][i] = pArray[i * __column + j];
+                               __pMatrix[j][i] = pArray[i * __row + j];
                        }
                }
        }