- // RootMoveList::sort_multipv() sorts the first few moves in the root move
- // list by their scores and depths. It is used to order the different PVs
- // correctly in MultiPV mode.
-
- void RootMoveList::sort_multipv(int n) {
-
- int i,j;
-
- for (i = 1; i <= n; i++)
- {
- const RootMove rm = this->at(i);
- for (j = i; j > 0 && this->at(j - 1) < rm; j--)
- (*this)[j] = this->at(j - 1);
-
- (*this)[j] = rm;
- }
- }
-