Definition at line 126 of file Concept.h. References Impala::Core::Matrix::VecE(), and Impala::Core::Matrix::VecNrElem(). 00128 { 00129 FILE *file; 00130 if (! (file = fopen(fileName.c_str(), "a"))) { 00131 std::cout << "PrintConceptVector: error append to file " << fileName 00132 << std::endl; 00133 return; 00134 } 00135 00136 // print sparse SVM format 00137 int n = Matrix::VecNrElem(histo); 00138 int* hPtr = Matrix::VecE(histo, 0); 00139 double eps = 0.0001; 00140 fprintf(file, "%d", frameNr); 00141 for (int i=0 ; i<n ; i++) 00142 { 00143 double sz = (double) hPtr[i] / numPix; 00144 if (sz > eps) 00145 fprintf(file, " %d:%f", i+1, sz); 00146 } 00147 fprintf(file, "\n"); 00148 00149 fclose(file); 00150 }
Here is the call graph for this function:
|