This class models a rectangular array of voters (a metaphor for a site that can be in one of several states), and is used in the voter experiment. At each time unit, a site is selected at random and then a neighbor of the site is selected with prescribed probabilities. The state (color) of the first site is changed to that of the neighbor. The class has methods for performing the experiment, and for setting and getting the number of rows and columns, the set of colors, and the probabilities that govern the selection of a neighbor.
The text area below gives the code for this object, so that you can browse the constructors, methods, and properties of the object. Of course, this source file is part of devices.zip, which contains all source and resource files for the objects in the devices package.