
&]\c           @   sE   d  d l  m Z d  d l m Z d g Z d d d d e d  Z d S(   i   (   t   _minimize_trust_region(   t   get_trlib_quadratic_subproblemt   _minimize_trust_krylovc         K   s   | d k r t d d   n  | d k rE | d k rE t d   n  | r t |  | d | d | d | d | d t d	 d
 d d d | j d t   | St |  | d | d | d | d | d t d	 d d d d | j d t   | Sd S(   s  
    Minimization of a scalar function of one or more variables using
    a nearly exact trust-region algorithm that only requires matrix
    vector products with the hessian matrix.

    .. versionadded:: 1.0.0

    Options
    -------
    inexact : bool, optional
        Accuracy to solve subproblems. If True requires less nonlinear
        iterations, but more vector products.
    s&   Jacobian is required for trust region s   exact minimization.sa   Either the Hessian or the Hessian-vector product is required for Krylov trust-region minimizationt   argst   jact   hesst   hesspt
   subproblemt	   tol_rel_ig       t	   tol_rel_bg      t   dispg:0yE>gư>N(   t   Nonet
   ValueErrorR    R   t   gett   False(   t   funt   x0R   R   R   R   t   inexactt   trust_region_options(    (    sA   lib/python2.7/site-packages/scipy/optimize/_trustregion_krylov.pyR      s$    N(    (   t   _trustregionR    t   _trlibR   t   __all__R   t   TrueR   (    (    (    sA   lib/python2.7/site-packages/scipy/optimize/_trustregion_krylov.pyt   <module>   s   	