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

double Impala::Core::Training::TesterIOHelper::ReadAveragePrecision (  )  [inline]

Definition at line 132 of file TesterIoHelper.h.

References AssertFileFound(), cConceptSet, cFeature, cModel, Impala::Core::Database::RawDataSet::GetFilePathConceptModel(), ILOG_ERROR, mReference, and ScoreFilename().

Referenced by Impala::Core::Training::Tester::TestAveragePrecision().

00133     {
00134         String filename = ScoreFilename();
00135         Table::ScoreTable* ranking = new Table::ScoreTable;
00136         String path = mReference->GetFilePathConceptModel
00137             (cConceptSet, cModel, cFeature, filename, false, false);
00138         AssertFileFound(path, "could not read AP " + filename);
00139 
00140         double ap = -1;
00141         std::ifstream ifs(path.c_str());
00142         if(ifs.is_open())
00143         {
00144             ifs.read((char*) &ap, sizeof(double));
00145             ifs.close();
00146         }
00147         else
00148             ILOG_ERROR("couldn't open file " << path << "for reading");
00149         return ap;
00150     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:24:37 2010 for ImpalaSrc by  doxygen 1.5.1