Subversion Repositories gelsvn

Rev

Rev 77 | Rev 448 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 77 Rev 315
Line 17... Line 17...
17
 
17
 
18
		~Grid2D() {}
18
		~Grid2D() {}
19
		
19
		
20
		Grid2D(int i, int j, const T& val): XDIM(i), YDIM(j), pixels(i*j, val) {}
20
		Grid2D(int i, int j, const T& val): XDIM(i), YDIM(j), pixels(i*j, val) {}
21
		Grid2D(int i, int j): XDIM(i), YDIM(j), pixels(i*j) {}
21
		Grid2D(int i, int j): XDIM(i), YDIM(j), pixels(i*j) {}
-
 
22
		Grid2D(): XDIM(0), YDIM(0) {}
-
 
23
 
-
 
24
		void resize(int i, int j) 
-
 
25
				{
-
 
26
						XDIM = i;
-
 
27
						YDIM = j;
-
 
28
						pixels.resize(i*j);
-
 
29
				}
-
 
30
 
22
		
31
		
23
		const T& operator()(int i, int j) const 
32
		const T& operator()(int i, int j) const 
24
		{
33
		{
25
		  assert(i>=0 && i< XDIM);
34
		  assert(i>=0 && i< XDIM);
26
		  assert(j>=0 && j< YDIM);
35
		  assert(j>=0 && j< YDIM);