本文整理汇总了C++中MoveList::GetMaxRank方法的典型用法代码示例。如果您正苦于以下问题:C++ MoveList::GetMaxRank方法的具体用法?C++ MoveList::GetMaxRank怎么用?C++ MoveList::GetMaxRank使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MoveList
的用法示例。
在下文中一共展示了MoveList::GetMaxRank方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MakeComplexMovesParallel
void MakeComplexMovesParallel()
{
bool newFlag;
for (int dlen = 2; dlen <= 13; dlen++)
{
int slStart = 1, cStart = 0;
bool flag;
cout << "\nDeclaring length " << dlen << ":\n";
double histRest = histCount[HIST_ORIG_COUNT][dlen];
for (int hno = 1; hno < HIST_COMPLEX; hno++)
histRest -= histCount[hno][dlen];
if (histRest < 1)
histRest = 1;
int skip = 0;
do
{
if (++skip == 10)
{
cout << "Count " << setw(8) << cStart << " (" <<
setw(5) << std::fixed << std::setprecision(2) <<
100. * histCount[HIST_COMPLEX][dlen] /
histRest << "%)" << endl;
skip = 0;
}
flag = MakeComplexTables(slStart, cStart, dlen);
StartTimer();
MakeComplexDistribute();
for (int i = 0; i < batchLen; i++)
{
int sl = holdingList[i].GetSuitLength();
int c = holdingList[i].GetCounter();
singles[sl][c].moveNo = moveList.AddMoves(
defList1[i], defList2[i], holdingList[i], newFlag);
histCount[HIST_COMPLEX][dlen]++;
// Header& header = singles[sl][c].defp->GetHeader();
// int r = static_cast<int>(header.GetMaxRank());
unsigned r = moveList.GetMaxRank(singles[sl][c].moveNo);
histRank[HIST_COMPLEX][r]++;
if (newFlag)
{
histMoveCount[HIST_COMPLEX][dlen]++;
histMoveRank[HIST_COMPLEX][r]++;
}
}
EndTimer();
}
while (flag);
}
cout << "\n";
}
示例2: MakeComplexMoves
void MakeComplexMoves()
{
int hist[14] = {0};
bool newFlag;
// General case.
Holding holding;
for (int dlen = 2; dlen <= 13; dlen++)
{
for (int sl = 1; sl <= 13; sl++)
{
for (int c = 0; c < SDS_NUMSINGLES[sl]; c++)
{
if (singles[sl][c].moveNo)
continue;
if (singles[sl][c].declLen != dlen)
continue;
// if (sl == 10 && c == 0x81aa)
// debugComplex = true;
// else
// debugComplex = false;
// cout << setw(2) << dlen <<
// setw(3) << sl << " " << setw(3) << hex << c << dec << endl;
holding.Set(sl, c);
DefList def1, def2;
MakeComplexSingleMove(holding, def1, def2);
StartTimer();
singles[sl][c].moveNo = moveList.AddMoves(def1, def2,
holding, newFlag);
EndTimer();
histCount[HIST_COMPLEX][dlen]++;
// Header& header = singles[sl][c].defp->GetHeader();
// int r = static_cast<int>(header.GetMaxRank());
unsigned r = moveList.GetMaxRank(singles[sl][c].moveNo);
histRank[HIST_COMPLEX][r]++;
if (newFlag)
{
histMoveCount[HIST_COMPLEX][dlen]++;
histMoveRank[HIST_COMPLEX][r]++;
}
}
}
}
}