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

void Impala::Core::Trec::TrecSVM::LoadModel ( std::string  fileName,
std::string  rangeFile 
) [inline]

Definition at line 154 of file TrecSVM.h.

References LoadModel(), mRangeMax, mRangeMin, and mScale.

00155     {
00156         LoadModel(fileName);
00157 
00158         // now load range file
00159         FILE* fp;
00160         if (! (fp = fopen(rangeFile.c_str(), "r")))
00161         {
00162             std::cout << "TrecSVM: unable to open " << rangeFile << std::endl;
00163             return;
00164         }
00165         char buf[200];
00166         int lineNr = 0;
00167         while (!feof(fp))
00168         {
00169             buf[0] = '\0';
00170             fgets(buf, 200, fp);
00171             if (strlen(buf) == 0)
00172                 continue;
00173             lineNr++;
00174             if (lineNr == 1)
00175                 continue; // skip first line
00176             int idx;
00177             double minVal;
00178             double maxVal;
00179             sscanf(buf, "%d %lf %lf", &idx, &minVal, &maxVal);
00180             std::cout << "read : " << idx << " " << minVal << " " << maxVal << std::endl;
00181             mRangeMin[idx-1] = minVal;
00182             mRangeMax[idx-1] = maxVal;
00183         }
00184         fclose(fp);
00185         mScale = true;
00186     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:26:42 2010 for ImpalaSrc by  doxygen 1.5.1