10 #ifndef __PRETTY_FUNCTION__ 16 template<
class Cell, const
bool debug=false>
class Array2D{
18 Array2D(
int xsize=0,
int ysize=0);
23 void resize(
int xmin,
int ymin,
int xmax,
int ymax);
26 inline bool isInside(
int x,
int y)
const;
27 inline const Cell&
cell(
int x,
int y)
const;
28 inline Cell&
cell(
int x,
int y);
47 template <
class Cell, const
bool debug>
63 std::cerr << __PRETTY_FUNCTION__ << std::endl;
64 std::cerr <<
"m_xsize= " <<
m_xsize<< std::endl;
65 std::cerr <<
"m_ysize= " <<
m_ysize<< std::endl;
69 template <
class Cell, const
bool debug>
86 std::cerr << __PRETTY_FUNCTION__ << std::endl;
87 std::cerr <<
"m_xsize= " << m_xsize<< std::endl;
88 std::cerr <<
"m_ysize= " << m_ysize<< std::endl;
93 template <
class Cell, const
bool debug>
104 std::cerr << __PRETTY_FUNCTION__ << std::endl;
105 std::cerr <<
"m_xsize= " << m_xsize<< std::endl;
106 std::cerr <<
"m_ysize= " <<
m_ysize<< std::endl;
110 template <
class Cell, const
bool debug>
113 std::cerr << __PRETTY_FUNCTION__ << std::endl;
114 std::cerr <<
"m_xsize= " <<
m_xsize<< std::endl;
115 std::cerr <<
"m_ysize= " <<
m_ysize<< std::endl;
125 template <
class Cell, const
bool debug>
128 std::cerr << __PRETTY_FUNCTION__ << std::endl;
129 std::cerr <<
"m_xsize= " <<
m_xsize<< std::endl;
130 std::cerr <<
"m_ysize= " <<
m_ysize<< std::endl;
143 template <
class Cell, const
bool debug>
147 Cell ** newcells=
new Cell *[xsize];
148 for (
int x=0; x<xsize; x++){
149 newcells[x]=
new Cell[ysize];
151 int dx= xmin < 0 ? 0 : xmin;
152 int dy= ymin < 0 ? 0 : ymin;
155 for (
int x=dx; x<Dx; x++){
156 for (
int y=dy; y<Dy; y++){
157 newcells[x-xmin][y-ymin]=this->
m_cells[x][y];
167 template <
class Cell, const
bool debug>
172 template <
class Cell, const
bool debug>
179 template <
class Cell, const
bool debug>
AccessibilityState cellState(const IntPoint &p) const
const Cell & cell(int x, int y) const
AccessibilityState cellState(int x, int y) const
bool isInside(const IntPoint &p) const
Array2D(int xsize=0, int ysize=0)
Cell & cell(const IntPoint &p)
const Cell & cell(const IntPoint &p) const
Array2D & operator=(const Array2D &)
bool isInside(int x, int y) const
int getPatchMagnitude() const
void resize(int xmin, int ymin, int xmax, int ymax)