centering3x3.h
Go to the documentation of this file.
00001 /* centering3x3.h
00002  */
00003 #ifndef OSL_CENTERING3X3_H
00004 #define OSL_CENTERING3X3_H
00005 
00006 #include "osl/square.h"
00007 #include "osl/misc/carray.h"
00008 
00009 namespace osl
00010 {
00014   struct Centering3x3
00015   {
00016     struct Table 
00017     {
00018       CArray<Square,Square::SIZE> centers;
00019       Table();
00020     };
00021     static const Square adjustCenterNaive(Square);
00022     static const Table table;
00023     static const Square adjustCenter(Square src)
00024     {
00025       return table.centers[src.index()];
00026     }
00027   };
00028 
00029 } // namespace osl
00030 
00031 #endif /* OSL_CENTERING3X3_H */
00032 // ;;; Local Variables:
00033 // ;;; mode:c++
00034 // ;;; c-basic-offset:2
00035 // ;;; coding:utf-8
00036 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines