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

SimTableTypeDiff.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Table_SimTableTypeDiff_h
00002 #define Impala_Core_Table_SimTableTypeDiff_h
00003 
00004 #include "Core/Table/SimilarityTableSet.h"
00005 
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Table
00011 {
00012 
00013 
00014 inline int
00015 SimTableTypeDiff(SimilarityTableSet::SimTableType* t1,
00016                  SimilarityTableSet::SimTableType* t2)
00017 {
00018     ILOG_VAR(Impala.Core.Table.SimTableTypeDiff);
00019 
00020     if (t1->Size() != t2->Size())
00021     {
00022         ILOG_ERROR("sizes differs: " << t1->Size() << " vs " << t2->Size());
00023         //return 1;
00024     }
00025     int nDiff = 0;
00026     for (int i=0 ; i<t1->Size() ; i++)
00027     {
00028         if (::fabs(t1->Get1(i) - t2->Get1(i)) > 0.00001)
00029         {
00030             ILOG_INFO("nr " << i << " differs " << t1->Get1(i) << " vs " <<
00031                        t2->Get1(i));
00032             nDiff++;
00033         }
00034     }
00035     if (nDiff > 0)
00036         ILOG_ERROR("Found " << nDiff << " differences");
00037     return nDiff;
00038 }
00039 
00040 } // namespace Table
00041 } // namespace Core
00042 } // namespace Impala
00043 
00044 #endif

Generated on Fri Mar 19 09:31:20 2010 for ImpalaSrc by  doxygen 1.5.1