MCPcopy Create free account
hub / github.com/biometrics/openbr / fileHasSinglePoint

Function fileHasSinglePoint

openbr/core/plot.cpp:242–259  ·  view source on GitHub ↗

Check if only one ROC point is in the file

Source from the content-addressed store, hash-verified

240
241//Check if only one ROC point is in the file
242bool fileHasSinglePoint(const QString &evalFile) {
243 QFile file(evalFile);
244 bool success = file.open(QFile::ReadOnly);
245 if (!success) qFatal("Failed to open %s for reading.", qPrintable(evalFile));
246 QStringList lines = QString(file.readAll()).split("\n");
247 file.close();
248
249 int rocCnt = 0;
250 foreach (const QString &line, lines) {
251 if (line.contains("DiscreteROC")) {
252 rocCnt++;
253 }
254 if (rocCnt > 1)
255 return false;
256 }
257
258 return true;
259}
260
261//Check all files to see if any single file has only have one ROC point
262bool filesHaveSinglePoint(const QStringList &files) {

Callers 1

filesHaveSinglePointFunction · 0.85

Calls 3

openMethod · 0.45
splitMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected