centering3x3.h Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
centering3x3.h
Go to the documentation of this file.
1 /* centering3x3.h
2 */
3 #ifndef OSL_CENTERING3X3_H
4 #define OSL_CENTERING3X3_H
5
6 #include "osl/square.h"
7 #include "osl/misc/carray.h"
8
9 namespace osl
10 {
14 struct Centering3x3
15 {
16 struct Table
17 {
18 CArray<Square,Square::SIZE> centers;
19 Table();
20 };
21 static const Square adjustCenterNaive(Square);
22 static const Table table;
23 static const Square adjustCenter(Square src)
24 {
25 return table.centers[src.index()];
26 }
27 };
28
29 } // namespace osl
30
31 #endif /* OSL_CENTERING3X3_H */
32 // ;;; Local Variables:
33 // ;;; mode:c++
34 // ;;; c-basic-offset:2
35 // ;;; coding:utf-8
36 // ;;; End: