class_tab.cpp
int tab::neigh(int x,int y){
	int cnt=0;
	FOR2(i,-1,2){
		FOR2(j,-1,2){
			if(!i && !j)continue;
			int xx=(x+i)%lar, yy=(y+j)%alt;
			if(xx<0)xx+=lar;
			if(yy<0)yy+=alt;
			if(v[xx][yy])cnt++;
		}
	}
	return cnt;
}
/**
 *  \brief Return the number of neighbors of a given cell
 *  
 *  \param [in] x The x position of the cell
 *  \param [in] y The y position of the cell
 *  
 */
\brief Return the number of neighbors of a given cell

\param [in] x The x position of the cell
\param [in] y The y position of the cell
\ brief Return the number of neighbors of a given cell \ param [ in ] x The x position of the cell \ param [ in ] y The y position of the cell
int tab::neigh(int x,int y){
	int cnt=0;
	FOR2(i,-1,2){
		FOR2(j,-1,2){
			if(!i && !j)continue;
			int xx=(x+i)%lar, yy=(y+j)%alt;
			if(xx<0)xx+=lar;
			if(yy<0)yy+=alt;
			if(v[xx][yy])cnt++;
		}
	}
	return cnt;
}
int tab :: neigh ( int x , int y ) { int cnt = 0 ; FOR2 ( i , -1 , 2 ) { FOR2 ( j , -1 , 2 ) { if ( ! i && ! j ) continue ; int xx = ( x + i ) % lar , yy = ( y + j ) % alt ; if ( xx < 0 ) xx += lar ; if ( yy < 0 ) yy += alt ; if ( v [ xx ] [ yy ] ) cnt ++ ; } } return cnt ; }
\brief Return the number of neighbors of a given cell
\ brief Return the number of neighbors of a given cell