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

template<class MatT>
Vector::VectorTem<double> Impala::Core::Matrix::GetDiagonal ( MatT *  m  )  [inline]

Definition at line 17 of file GetDiagonal.h.

References ILOG_ERROR, ILOG_VAR, MatE(), MatNrCol(), and MatNrRow().

Referenced by Impala::Core::Feature::MarkovStationaryFeature().

00018 {
00019     ILOG_VAR(Impala.Core.Matrix.GetDiagonal);
00020     if (MatNrRow(m) != MatNrCol(m))
00021     {
00022         ILOG_ERROR("only works for square matrices!");
00023         return Vector::VectorTem<double>(0);
00024     }
00025     Vector::VectorTem<double> v(MatNrRow(m));
00026     for (int i=0 ; i<MatNrRow(m) ; i++)
00027         v[i] = *MatE(m, i, i);
00028     return v;
00029 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:20:11 2011 for ImpalaSrc by  doxygen 1.5.1