public class RuntimeTest {
public static void main(String[] args)
{
Runtime rt=Runtime.getRuntime();
try
}
catch(Exception e)
e.printStackTrace();
public class Model {
Integer a[];
Integer b[];
Integer rule[];
public Model() {
a = new Integer[NUM_OF_CELL];
b = new Integer[NUM_OF_CELL];
rule[0] = 0;
rule[1] = 1;
for (int i = 0; i NUM_OF_CELL; i◆◆) {
a[i] = 0;
public static void main(String[] args) {
Model sm = new Model ();
sm.doIt();
private void doIt() {
String str = "";
for (int t = 0; t TIME_MAX; t◆◆) {
b[i] = function(a[(NUM_OF_CELL ◆ i - 1) % NUM_OF_CELL],a[i],a[(i ◆ 1) % NUM_OF_CELL]);
if (a[i] == 0) {
str = "#";
} else {
str = "*";
System.out.print(str ◆ " ");
System.out.println("");
for (int j = 0; j NUM_OF_CELL; j◆◆) {
a[j] = b[j];
return rule[0];
return rule[1];
return 0;
以上就是土嘎嘎小编为大家整理的有限自动机代码java相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!