All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ptypeOSquareVector.cc
Go to the documentation of this file.
2 #include "osl/eval/pieceEval.h"
3 #include <algorithm>
4 
5 namespace osl
6 {
8  {
9  bool operator()(const std::pair<PtypeO,Square>& l,
10  const std::pair<PtypeO,Square>& r)
11  {
12  const int vall = abs(eval::Ptype_Eval_Table.captureValue(l.first));
13  const int valr = abs(eval::Ptype_Eval_Table.captureValue(r.first));
14  if (vall != valr)
15  return vall < valr;
16  return l.second.uintValue() < r.second.uintValue();
17  }
18  };
19 
21  {
22  std::sort(begin(),end(),PtypeOSquareLessThan());
23  }
24 
25 }
26 // ;;; Local Variables:
27 // ;;; mode:c++
28 // ;;; c-basic-offset:2
29 // ;;; End: