00001 /******************************************************************************* 00002 * Matrix.cpp 00003 * 00004 * (C) 2007 AG Aktives Sehen <agas@uni-koblenz.de> 00005 * Universitaet Koblenz-Landau 00006 * 00007 * Additional information: 00008 * $Id: $ 00009 *******************************************************************************/ 00010 00011 #include "Matrix.h" 00012 00013 #define THIS Matrix 00014 00015 THIS THIS::transpose() { 00016 Matrix newMatrix(m_Columns, m_Lines); 00017 for (unsigned i = 0; i < m_Lines*m_Columns; i++) { 00018 newMatrix.setValue(i/m_Columns, i%m_Lines, m_Values[i/m_Lines * i%m_Columns]); 00019 } 00020 return newMatrix; 00021 } 00022 00023 #undef THIS