本文整理汇总了C++中Stitcher::calcSetStitch2方法的典型用法代码示例。如果您正苦于以下问题:C++ Stitcher::calcSetStitch2方法的具体用法?C++ Stitcher::calcSetStitch2怎么用?C++ Stitcher::calcSetStitch2使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stitcher
的用法示例。
在下文中一共展示了Stitcher::calcSetStitch2方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkMultithreaded
float checkMultithreaded (string const & myResult, string const & learning)
{
ofstream cmpLog("compare_log.txt", ofstream::trunc);
if (!cmpLog.is_open())
{
cerr << "Cannot create compare_log file.\n";
return 0;
}
map<int, vector<int> > myOdds = readOutput(myResult);
map<int, vector<int> > trueOdds = readOutput(learning);
int currentSetN = StartSet;
int n_wrong = 0;
float mark = 0;
Stitcher stitcher;
while (currentSetN < FinishSet)
{
vector<int> v1 = getNextSet(currentSetN, myOdds);
vector<int> v2 = getNextSet(currentSetN, trueOdds);
float tmpMark = compareResults(v1, v2);
if (tmpMark != 1.0)
{
cmpLog << currentSetN << "\nmy odds:";
printIntVector(cmpLog, v1);
cmpLog << "true odds:";
printIntVector(cmpLog, v2);
int tmp;
printMat_(cmpLog, stitcher.calcSetStitch2(currentSetN, &tmp));
//Stitcher::printStitchMatrix(cmpLog, stitcher.calcSetStitch2(currentSetN));
n_wrong += 1;
}
mark += tmpMark;
currentSetN += 1;
}
cmpLog << n_wrong << " classified wrong.";
cmpLog.close();
return (currentSetN-StartSet>0) ? mark/(currentSetN-StartSet) : mark;
}