template<class ArrayT>
Definition at line 27 of file MatTranspose.h. References ILOG_ERROR, ILOG_VAR, MatE(), MatNrCol(), and MatNrRow(). 00028 { 00029 ILOG_VAR(Core.Matrix.MatTransposeInplace); 00030 if(MatNrRow(m) != MatNrCol(m)) 00031 ILOG_ERROR("only works for square matrices!"); 00032 for (int i=0 ; i<MatNrRow(m) ; i++) 00033 for (int j=i+1 ; j<MatNrCol(m) ; j++) 00034 { 00035 typename ArrayT::ArithType temp; 00036 temp = *MatE(m, j, i); 00037 *MatE(m, j, i) = *MatE(m, i, j); 00038 *MatE(m, i, j) = temp; 00039 } 00040 }
Here is the call graph for this function:
|