1 package JSci.maths.chaos; 2 3 import JSci.maths.*; 4 5 13 public final class GingerbreadManMap extends Object implements MappingND { 14 17 public final static double X_CHAOS[]={-0.1,0.0}; 18 21 public GingerbreadManMap() {} 22 27 public double[] map(double x[]) { 28 double ans[]=new double[2]; 29 ans[0]=1.0-x[1]+Math.abs(x[0]); 30 ans[1]=x[0]; 31 return ans; 32 } 33 39 public double[] iterate(int n,double x[]) { 40 double xn[]=map(x); 41 for(int i=1;i<n;i++) 42 xn=map(xn); 43 return xn; 44 } 45 } 46 47 | Popular Tags |