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

double Kernel::dot ( const svm_node px,
const svm_node py 
) [static, private]

Definition at line 258 of file svm.cpp.

References svm_node::index, and svm_node::value.

Referenced by k_function(), Kernel(), kernel_linear(), kernel_poly(), kernel_rbf(), and kernel_sigmoid().

00259 {
00260         double sum = 0;
00261         while(px->index != -1 && py->index != -1)
00262         {
00263                 if(px->index == py->index)
00264                 {
00265                         sum += px->value * py->value;
00266                         ++px;
00267                         ++py;
00268                 }
00269                 else
00270                 {
00271                         if(px->index > py->index)
00272                                 ++py;
00273                         else
00274                                 ++px;
00275                 }                       
00276         }
00277         return sum;
00278 }


Generated on Fri Mar 19 10:32:21 2010 for ImpalaSrc by  doxygen 1.5.1