ó
Ê½÷Xc           @` sÜ   d  Z  d d l m Z m Z m Z d d l m Z d d l m Z d „  Z	 d „  Z
 d „  Z d „  Z d	 „  Z d
 „  Z d Z e j e j e j e j g Z d d d d g Z e
 e e e e g Z d d d d d g Z d S(   s/    Parameters used in test and benchmark methods i    (   t   divisiont   print_functiont   absolute_import(   t   random(   t   zerosc         C` s   |  |  d S(   Ng      ð?(    (   t   x(    (    s7   /tmp/pip-build-7oUkmx/scipy/scipy/optimize/_tstutils.pyt   f1	   s    c         C` s   |  d d S(   Ni   i   (    (   R   (    (    s7   /tmp/pip-build-7oUkmx/scipy/scipy/optimize/_tstutils.pyt   f2   s    c         C` s   |  |  d |  d |  d S(   Ng      ð?g       @g      @(    (   R   (    (    s7   /tmp/pip-build-7oUkmx/scipy/scipy/optimize/_tstutils.pyt   f3   s    c         C` s4   |  d k r d d |  S|  d k  r0 d d |  Sd S(   Ni   g      ð?gš™™™™™¹?g      ð¿i    (    (   R   (    (    s7   /tmp/pip-build-7oUkmx/scipy/scipy/optimize/_tstutils.pyt   f4   s
    c         C` s   |  d k r d d |  Sd S(   Ni   g      ð?i    (    (   R   (    (    s7   /tmp/pip-build-7oUkmx/scipy/scipy/optimize/_tstutils.pyt   f5   s    c         C` s/   |  d k r t  ƒ  S|  d k  r' t  ƒ  Sd Sd  S(   Ni   i    (   R   (   R   (    (    s7   /tmp/pip-build-7oUkmx/scipy/scipy/optimize/_tstutils.pyt   f6#   s
    s  
f2 is a symmetric parabola, x**2 - 1
f3 is a quartic polynomial with large hump in interval
f4 is step function with a discontinuity at 1
f5 is a hyperbola with vertical asymptote at 1
f6 has random values positive to left of 1, negative to right

of course these are not real problems. They just test how the
'good' solvers behave in bad circumstances where bisection is
really the best. A good solver should not be much worse than
bisection in such circumstance, while being faster for smooth
monotone sorts of functions.
s	   cc.bisects	   cc.ridders	   cc.brenths	   cc.brentqR   R   R	   R
   R   N(   t   __doc__t
   __future__R    R   R   R   t   scipy.optimizeR   t   ccR   R   R   R	   R
   R   t   descriptiont   bisectt   riddert   brentht   brentqt   methodst   mstringst	   functionst   fstrings(    (    (    s7   /tmp/pip-build-7oUkmx/scipy/scipy/optimize/_tstutils.pyt   <module>   s   						