![$p \in [0,1]$](img3.png) is the desired density of ones (number of ones divided by
lattice size). Note that this function generates random initial condition
with exactly
 is the desired density of ones (number of ones divided by
lattice size). Note that this function generates random initial condition
with exactly 
 ones, where
 ones, where  is the lattice size.
 is the lattice size.
You can also generate you own initial condition by directly setting individual
lattice bits. This can be done with ![$[\cdot ]$](img6.png) operator. For example, in order to set first 50 sites to 1, and the rest to 0,
we can type
 operator. For example, in order to set first 50 sites to 1, and the rest to 0,
we can type 
Lattice lat(100); int i; for(i=0; i<50; i++) lat[i]=1;