Ñò
îÉùKc           @   sÆ   y d  d k  Z d  d k i Z Wn e j
 o Z d Ge GHn Xd d d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ	 d	 e f d
 „  ƒ  YZ
 h d e g d 6d e	 g d 6d e
 g d 6Z d S(   iÿÿÿÿNs   Error importing modules:t	   OneDimMapc           B   s;   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sV   
	Base class for all map classes. This provides 
	methods common to all map classes.
	c         C   s)   d d d g |  _  |  i ƒ  d |  _ d S(   s'   Constructor for the OneDMap base class.g        g      ð?s   One Dimensional Map f(x) = xN(   t   defaultst	   resetValst   mapStr(   t   self(    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyt   __init__   s    
c         C   s   |  i  S(   s   String representation of map.(   R   (   R   (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyt   __repr__   s    c         C   s%   x t  | ƒ D] } |  i ƒ  q Wd S(   s3   Iterates the map num_its times and saves the state.N(   t   xranget   func(   R   t   num_itst   n(    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyt   __call__!   s     c         C   s   d |  _  d S(   s:   Computes f(x). This is a place holder for all map classes.g        N(   t   state(   R   (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR   (   s    c         C   sT   |  i  d |  _ |  i  d |  _ |  i  d |  _ |  i  d |  _ |  i  d |  _ d S(   s,   Set map values to their respective defaults.i    i   i   N(   R   t   icR   t   rt   rLowt   rHi(   R   (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR   -   s
    (   t   __name__t
   __module__t   __doc__R   R   R   R   R   (    (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR       s   	
			t   LogisticMapc           B   s    e  Z d  Z d „  Z d „  Z RS(   s   The logistic map class.c         C   s6   t  i |  ƒ d d d g |  _ |  i ƒ  d |  _ d S(   s%   Constructor for a LogisticMap object.g333333Ó?g        g      @s   Logistic Map: f(x) = rx(1-x)N(   R    R   R   R   R   (   R   (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR   =   s    
c         C   s"   |  i  |  i d |  i |  _ d S(   s"   Defines the logistic map function.g      ð?N(   R   R   (   R   (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR   J   s    (   R   R   R   R   R   (    (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR   :   s   	t	   CosineMapc           B   s    e  Z d  Z d „  Z d „  Z RS(   s   The cosine map class.c         C   s6   t  i |  ƒ d d d g |  _ |  i ƒ  d |  _ d S(   s#   Constructor for a CosineMap object.g333333Ó?g      Àg      @s   Cosine Map: f(x)=rcos(x)N(   R    R   R   R   R   (   R   (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR   U   s    
c         C   s    |  i  t i |  i ƒ |  _ d S(   s    Defines the cosine map function.N(   R   t   npt   cosR   (   R   (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR   b   s    (   R   R   R   R   R   (    (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR   R   s   	t   TentMapc           B   s    e  Z d  Z d „  Z d „  Z RS(   s   The tent map class.c         C   s6   t  i |  ƒ d d d g |  _ |  i ƒ  d |  _ d S(   s!   Constructor for a TentMap object.g333333Ó?g        g       @s/   Tent Map: f(x)=rx (x<0.5), f(x)=r(1-x) (x>=0.5)N(   R    R   R   R   R   (   R   (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR   l   s    
c         C   sB   |  i  d j  o |  i |  i  |  _  n |  i d |  i  |  _  d S(   s   Defines the tent map function.g      à?g      ð?N(   R   R   (   R   (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR   y   s    (   R   R   R   R   R   (    (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyR   j   s   	s   Logistic Map: f(x)=rx(1-x)t   1s   Cosine Map: f(x)=rcos(x)t   2s/   Tent Map: f(x)=rx (x<0.5), f(x)=r(1-x) (x>=0.5)t   3(    (   t   numpyR   t   matplotlib.pyplott   pyplott   pltt   ImportErrort   msgR    R   R   R   t   maps(    (    (    sV   /Users/chaos/Presentations/NonlinearPhysics 2010/Software/PartE_Code/OneDMapClasses.pyt   <module>   s   .