Implements Kernel. Definition at line 1214 of file svm.cpp. References buffer, cache, Cache::get_data(), index, Kernel::kernel_function, l, next_buffer, and sign. 01215 { 01216 Qfloat *data; 01217 int real_i = index[i]; 01218 if(cache->get_data(real_i,&data,l) < l) 01219 { 01220 for(int j=0;j<l;j++) 01221 data[j] = (Qfloat)(this->*kernel_function)(real_i,j); 01222 } 01223 01224 // reorder and copy 01225 Qfloat *buf = buffer[next_buffer]; 01226 next_buffer = 1 - next_buffer; 01227 schar si = sign[i]; 01228 for(int j=0;j<len;j++) 01229 buf[j] = si * sign[j] * data[index[j]]; 01230 return buf; 01231 }
Here is the call graph for this function:
|