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

int Impala::Core::Training::FikSvm::Diff ( FikSvm arg  )  [inline]

Definition at line 219 of file FikSvm.h.

References Impala::Core::Vector::Diff(), Impala::Core::Feature::WeightedFeatureList::Diff(), GetA(), GetB(), GetFeatureList(), GetH(), GetNrBins(), GetNrFeatures(), GetNrSV(), GetProbA(), GetProbB(), GetProbIndex(), GetRho(), and ILOG_ERROR.

00220     {
00221         int nDiff = GetFeatureList()->Diff(arg->GetFeatureList());
00222         if (nDiff > 0)
00223         {
00224             ILOG_ERROR("Features differ");
00225         }
00226         if (GetNrBins() != arg->GetNrBins())
00227         {
00228             ILOG_ERROR("NrBins differ");
00229             nDiff++;
00230         }
00231         if (GetNrSV() != arg->GetNrSV())
00232         {
00233             ILOG_ERROR("NrSV differ");
00234             nDiff++;
00235         }
00236         if (fabs(GetRho() - arg->GetRho()) > 0.00001)
00237         {
00238             ILOG_ERROR("Rho differs");
00239             nDiff++;
00240         }
00241         if (fabs(GetProbA() - arg->GetProbA()) > 0.00001)
00242         {
00243             ILOG_ERROR("ProbA differs");
00244             nDiff++;
00245         }
00246         if (fabs(GetProbB() - arg->GetProbB()) > 0.00001)
00247         {
00248             ILOG_ERROR("ProbB differs");
00249             nDiff++;
00250         }
00251         if (GetProbIndex() != arg->GetProbIndex())
00252         {
00253             ILOG_ERROR("ProbIndex differs");
00254             nDiff++;
00255         }
00256         if (nDiff > 0)
00257             return nDiff;
00258 
00259         for (int i=0 ; i<GetNrFeatures() ; i++)
00260         {
00261             Mat* m1 = GetH(i);
00262             Mat* m2 = arg->GetH(i);
00263             int d = Array::Diff(m1, m2, 0.00001);
00264             if (d > 0)
00265                 ILOG_ERROR("H[" << i << "] differs");
00266             nDiff += d;
00267             delete m1;
00268             delete m2;
00269             VectorReal64 v1 = GetA(i);
00270             VectorReal64 v2 = arg->GetA(i);
00271             d = Vector::Diff(v1, v2, 0.00001);
00272             if (d > 0)
00273                 ILOG_ERROR("A[" << i << "] differs");
00274             nDiff += d;
00275             v1 = GetB(i);
00276             v2 = arg->GetB(i);
00277             d = Vector::Diff(v1, v2, 0.00001);
00278             if (d > 0)
00279                 ILOG_ERROR("B[" << i << "] differs");
00280             nDiff += d;
00281         }
00282         if (nDiff > 0)
00283             ILOG_ERROR("Found " << nDiff << " differences in FAC's");
00284         return nDiff;
00285     }

Here is the call graph for this function:


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