- T &elem (Direction d)
- {
- assert (d==1 || d== -1);
- return array_[ (d+1)/2];
-
- }
- T &operator[] (Direction d)
+ T &at (Direction d)
+ {
+ assert (d == 1 || d == -1);
+ return array_[ (d + 1) / 2];
+ }
+ T const &at (Direction d) const
+ {
+ assert (d == 1 || d == -1);
+ return array_[ (d + 1) / 2];
+ }
+ T &operator [] (Direction d)