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

void Impala::Application::Im::DoMatrix (  ) 

Definition at line 763 of file mainIm.cpp.

References Impala::atol(), Impala::Core::Matrix::MatrixTem< C >::covariance(), Impala::CmdOptions::GetArg(), Impala::Util::Database::GetInstance(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetNrArg(), ILOG_ERROR, ILOG_INFO, ILOG_VAR, Impala::Core::Matrix::MatCovariance(), Impala::Core::Matrix::MatTranspose(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::mCH, Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::mCW, Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::mData, Impala::Core::Array::ReadRaw(), and Impala::Timer::SplitTime().

Referenced by mainIm().

00764 {
00765     ILOG_VAR(Impala.Application.Im.DoMatrix);
00766     CmdOptions& options = CmdOptions::GetInstance();
00767     if (options.GetNrArg() < 3)
00768     {
00769         ILOG_ERROR("Need more arguments");
00770         return;
00771     }
00772     Util::Database* db = &Util::Database::GetInstance();
00773 
00774     String fileName = options.GetArg(1);
00775     int version = atol(options.GetArg(2));
00776 
00777     typedef Array2dScalarReal64 Mat;
00778     //typedef VecScalarReal64 Vec;
00779 
00780     Mat* m1 = 0;
00781     ReadRaw(m1, fileName, db);
00782     Mat* m2 = MatTranspose(m1);
00783     delete m1;
00784     MatrixDouble m(m2->mCH, m2->mCW, m2->mData);
00785     Timer timer(1);
00786     if (version == 1)
00787     {
00788         ILOG_INFO("time: " << timer.SplitTime() << " Array based ");
00789         //m1 = MatKLM(m2, 4);
00790         m1 = MatCovariance(m2, (Mat*) 0);
00791     }
00792     else
00793     {
00794         ILOG_INFO("time: " << timer.SplitTime() << " Matrix based ");
00795         //m = m.klm(4);
00796         VectorTem<double> v;
00797         m = m.covariance(v);
00798     }
00799 ILOG_INFO("time: " << timer.SplitTime());
00800 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:15:12 2011 for ImpalaSrc by  doxygen 1.5.1