|
| SVC_Q (const svm_problem &prob, const svm_parameter ¶m, const schar *y_) |
|
Qfloat * | get_Q (int i, int len) const |
|
double * | get_QD () const |
|
void | swap_index (int i, int j) const |
|
| Kernel (int l, svm_node *const *x, const svm_parameter ¶m) |
|
virtual Qfloat * | get_Q (int column, int len) const =0 |
|
virtual double * | get_QD () const =0 |
|
virtual void | swap_index (int i, int j) const |
|
virtual Qfloat * | get_Q (int column, int len) const =0 |
|
virtual double * | get_QD () const =0 |
|
virtual void | swap_index (int i, int j) const =0 |
|
Definition at line 1273 of file svm.cpp.
◆ SVC_Q()
Definition at line 1276 of file svm.cpp.
1277 :
Kernel(prob.l, prob.x, param)
1278 {
1279 clone(y,y_,prob.l);
1280 cache =
new Cache(prob.l,(
long int)(param.cache_size*(1<<20)));
1281 QD = new double[prob.l];
1282 for(int i=0;i<prob.l;i++)
1283 QD[i] = (this->*kernel_function)(i,i);
1284 }
◆ ~SVC_Q()
Definition at line 1311 of file svm.cpp.
1312 {
1313 delete[] y;
1314 delete cache;
1315 delete[] QD;
1316 }
◆ get_Q()
Qfloat * SVC_Q::get_Q |
( |
int |
i, |
|
|
int |
len |
|
) |
| const |
|
inlinevirtual |
Implements Kernel.
Definition at line 1286 of file svm.cpp.
1287 {
1288 Qfloat *data;
1289 int start, j;
1290 if((start = cache->get_data(i,&data,len)) < len)
1291 {
1292 for(j=start;j<len;j++)
1293 data[j] = (Qfloat)(y[i]*y[j]*(this->*kernel_function)(i,j));
1294 }
1295 return data;
1296 }
◆ get_QD()
double * SVC_Q::get_QD |
( |
| ) |
const |
|
inlinevirtual |
Implements Kernel.
Definition at line 1298 of file svm.cpp.
1299 {
1300 return QD;
1301 }
◆ swap_index()
void SVC_Q::swap_index |
( |
int |
i, |
|
|
int |
j |
|
) |
| const |
|
inlinevirtual |
Reimplemented from Kernel.
Definition at line 1303 of file svm.cpp.
1304 {
1305 cache->swap_index(i,j);
1306 Kernel::swap_index(i,j);
1307 swap(y[i],y[j]);
1308 swap(QD[i],QD[j]);
1309 }
The documentation for this class was generated from the following file:
- /usr/src/slapt-src/gis/pktools/PKTOOLS-2.6.7.6/src/algorithms/svm.cpp