Documentation of 'edu.rit.smp.ca.CCASeq' Java class
CCASeq
edu.rit.smp.ca

Class CCASeq



  • public class CCASeq
    extends java.lang.Object
    Class CCASeq is a sequential program that calculates the evolution of a continuous cellular automaton and stores the result in a grayscale PJG image file.

    Usage: java edu.rit.smp.ca.CCASeq C S A B imagefile
    C = Number of cells (>= 1)
    S = Number of time steps (>= 1)
    A = Multiplicand in update formula (rational number)
    B = Addend in update formula (rational number)
    imagefile = Output PJG image file name

    The cellular automaton (CA) consists of an array of C cells. Each cell's value is a rational number in the range 0 to 1. A cell's next value is computed as follows: Compute the average of the cell itself, the cell's left neighbor, and the cell's right neighbor (wraparound boundary conditions); multiply by A; add B; and take the fractional part, yielding a result in the range 0 to 1. The CA's initial state is all cells 0, except the middle cell is 1. The program evolves the CA's initial state for S time steps and generates a grayscale image with S+1 rows and C columns. The first row of the image corresponds to the CA's initial state, and each subsequent row corresponds to the CA's state after the next time step. In the image, each pixel's gray value is proportional to the corresponding cell's value, with 0 being white and 1 being black. The image is stored in a Parallel Java Graphics (PJG) file. For further information about the PJG format, see class PJGImage.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void main(java.lang.String[] args)
      Main program.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • main

        public static void main(java.lang.String[] args)
                         throws java.lang.Exception
        Main program.
        Throws:
        java.lang.Exception

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.