Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

GetRow.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Matrix_GetRow_h
00002 #define Impala_Core_Matrix_GetRow_h
00003 
00004 #include "Basis/ILog.h"
00005 #include "Core/Matrix/MatFunc.h"
00006 #include "Core/Vector/VectorTem.h"
00007 
00008 namespace Impala
00009 {
00010 namespace Core
00011 {
00012 namespace Matrix
00013 {
00014 
00015 template<class MatT>
00016 inline Vector::VectorTem<double>
00017 GetRow(MatT* m, int index)
00018 {
00019     ILOG_VAR(Impala.Core.Matrix.GetRow);
00020     int length = MatNrCol(m);
00021     Vector::VectorTem<double> v(length);
00022     if (index < 0 || index >= MatNrRow(m))
00023         ILOG_ERROR_NODE("faulty row index: " << index);
00024     for (int i=0 ; i<length ; i++)
00025         v[i] = *MatE(m, index, i);
00026     return v;
00027 }
00028 
00029 } // namespace Matrix
00030 } // namespace Core
00031 } // namespace Impala
00032 
00033 #endif

Generated on Thu Jan 13 09:04:32 2011 for ImpalaSrc by  doxygen 1.5.1