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

void Impala::Application::Im::DoTestEqual (  ) 

Definition at line 194 of file mainIm.cpp.

References Impala::Core::Array::ARRAY2DSCALARINT32, Impala::Core::Array::ARRAY2DSCALARREAL64, Impala::Core::Array::ARRAY2DSCALARUINT8, Impala::Core::Array::ARRAY2DVEC3UINT8, Impala::atof(), DoTestEqualTem(), Impala::CmdOptions::GetArg(), Impala::Util::Database::GetInstance(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetNrArg(), ILOG_ERROR, ILOG_INFO, ILOG_VAR, and Impala::Core::Array::ReadRawArrayType().

Referenced by mainIm().

00195 {
00196     ILOG_VAR(Impala.Application.Im.DoTestEqual);
00197     CmdOptions& options = CmdOptions::GetInstance();
00198     if (options.GetNrArg() < 3)
00199     {
00200         ILOG_ERROR("Need more arguments");
00201         return;
00202     }
00203     Util::Database* db = &Util::Database::GetInstance();
00204 
00205     String name1 = options.GetArg(1);
00206     String name2 = options.GetArg(2);
00207     double eps = 0.00001;
00208     if (options.GetNrArg() >= 5)
00209         eps = atof(options.GetArg(4));
00210 
00211     ArrayType type1 = ReadRawArrayType(name1, db);
00212     ArrayType type2 = ReadRawArrayType(name2, db);
00213     if (type1 != type2)
00214     {
00215         ILOG_INFO("ArrayType's differ");
00216         return;
00217     }
00218 
00219     switch (type1)
00220     {
00221     case ARRAY2DSCALARUINT8:
00222         DoTestEqualTem(Array2dScalarUInt8(), name1, name2, eps);
00223         break;
00224     case ARRAY2DSCALARINT32:
00225         DoTestEqualTem(Array2dScalarInt32(), name1, name2, eps);
00226         break;
00227     case ARRAY2DSCALARREAL64:
00228         DoTestEqualTem(Array2dScalarReal64(), name1, name2, eps);
00229         break;
00230     case ARRAY2DVEC3UINT8:
00231         DoTestEqualTem(Array2dVec3UInt8(), name1, name2, eps);
00232         break;
00233     default:
00234         ILOG_INFO("unknown array type");
00235     }
00236 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:42:12 2010 for ImpalaSrc by  doxygen 1.5.1