ó
Ê½÷Xc           @` s[  d  Z  d d l m Z m Z m Z d d l Td d l Td d l Td d l Td d l	 Td d l
 m Z m Z d d l m Z d d l m Z d d l Td d l m Z d d	 l m Z d d
 l m Z d d l m Z m Z d d l m Z d d l m Z d d l m Z m  Z  g  e! ƒ  D] Z" e" j# d ƒ se" ^ qZ$ d d l% m& Z& e& ƒ  j' Z' d S(   s‰  
=====================================================
Optimization and root finding (:mod:`scipy.optimize`)
=====================================================

.. currentmodule:: scipy.optimize

Optimization
============

Local Optimization
------------------

.. autosummary::
   :toctree: generated/

   minimize - Unified interface for minimizers of multivariate functions
   minimize_scalar - Unified interface for minimizers of univariate functions
   OptimizeResult - The optimization result returned by some optimizers
   OptimizeWarning - The optimization encountered problems

The `minimize` function supports the following methods:

.. toctree::

   optimize.minimize-neldermead
   optimize.minimize-powell
   optimize.minimize-cg
   optimize.minimize-bfgs
   optimize.minimize-newtoncg
   optimize.minimize-lbfgsb
   optimize.minimize-tnc
   optimize.minimize-cobyla
   optimize.minimize-slsqp
   optimize.minimize-dogleg
   optimize.minimize-trustncg

The `minimize_scalar` function supports the following methods:

.. toctree::

   optimize.minimize_scalar-brent
   optimize.minimize_scalar-bounded
   optimize.minimize_scalar-golden

The specific optimization method interfaces below in this subsection are
not recommended for use in new scripts; all of these methods are accessible
via a newer, more consistent interface provided by the functions above.

General-purpose multivariate methods:

.. autosummary::
   :toctree: generated/

   fmin - Nelder-Mead Simplex algorithm
   fmin_powell - Powell's (modified) level set method
   fmin_cg - Non-linear (Polak-Ribiere) conjugate gradient algorithm
   fmin_bfgs - Quasi-Newton method (Broydon-Fletcher-Goldfarb-Shanno)
   fmin_ncg - Line-search Newton Conjugate Gradient

Constrained multivariate methods:

.. autosummary::
   :toctree: generated/

   fmin_l_bfgs_b - Zhu, Byrd, and Nocedal's constrained optimizer
   fmin_tnc - Truncated Newton code
   fmin_cobyla - Constrained optimization by linear approximation
   fmin_slsqp - Minimization using sequential least-squares programming
   differential_evolution - stochastic minimization using differential evolution

Univariate (scalar) minimization methods:

.. autosummary::
   :toctree: generated/

   fminbound - Bounded minimization of a scalar function
   brent - 1-D function minimization using Brent method
   golden - 1-D function minimization using Golden Section method

Equation (Local) Minimizers
---------------------------

.. autosummary::
   :toctree: generated/

   leastsq - Minimize the sum of squares of M equations in N unknowns
   least_squares - Feature-rich least-squares minimization.
   nnls - Linear least-squares problem with non-negativity constraint
   lsq_linear - Linear least-squares problem with bound constraints

Global Optimization
-------------------

.. autosummary::
   :toctree: generated/

   basinhopping - Basinhopping stochastic optimizer
   brute - Brute force searching optimizer
   differential_evolution - stochastic minimization using differential evolution

Rosenbrock function
-------------------

.. autosummary::
   :toctree: generated/

   rosen - The Rosenbrock function.
   rosen_der - The derivative of the Rosenbrock function.
   rosen_hess - The Hessian matrix of the Rosenbrock function.
   rosen_hess_prod - Product of the Rosenbrock Hessian with a vector.

Fitting
=======

.. autosummary::
   :toctree: generated/

   curve_fit -- Fit curve to a set of points

Root finding
============

Scalar functions
----------------
.. autosummary::
   :toctree: generated/

   brentq - quadratic interpolation Brent method
   brenth - Brent method, modified by Harris with hyperbolic extrapolation
   ridder - Ridder's method
   bisect - Bisection method
   newton - Secant method or Newton's method

Fixed point finding:

.. autosummary::
   :toctree: generated/

   fixed_point - Single-variable fixed-point solver

Multidimensional
----------------

General nonlinear solvers:

.. autosummary::
   :toctree: generated/

   root - Unified interface for nonlinear solvers of multivariate functions
   fsolve - Non-linear multi-variable equation solver
   broyden1 - Broyden's first method
   broyden2 - Broyden's second method

The `root` function supports the following methods:

.. toctree::

   optimize.root-hybr
   optimize.root-lm
   optimize.root-broyden1
   optimize.root-broyden2
   optimize.root-anderson
   optimize.root-linearmixing
   optimize.root-diagbroyden
   optimize.root-excitingmixing
   optimize.root-krylov
   optimize.root-dfsane

Large-scale nonlinear solvers:

.. autosummary::
   :toctree: generated/

   newton_krylov
   anderson

Simple iterations:

.. autosummary::
   :toctree: generated/

   excitingmixing
   linearmixing
   diagbroyden

:mod:`Additional information on the nonlinear solvers <scipy.optimize.nonlin>`

Linear Programming
==================

Simplex Algorithm:

.. autosummary::
   :toctree: generated/

   linprog -- Linear programming using the simplex algorithm
   linprog_verbose_callback -- Sample callback function for linprog

The `linprog` function supports the following methods:

.. toctree::

   optimize.linprog-simplex

Assignment problems:

.. autosummary::
   :toctree: generated/

   linear_sum_assignment -- Solves the linear-sum assignment problem


Utilities
=========

.. autosummary::
   :toctree: generated/

   approx_fprime - Approximate the gradient of a scalar function
   bracket - Bracket a minimum, given two starting points
   check_grad - Check the supplied derivative using finite differences
   line_search - Return a step that satisfies the strong Wolfe conditions

   show_options - Show specific options optimization solvers
   LbfgsInvHessProduct - Linear operator for L-BFGS approximate inverse Hessian

i    (   t   divisiont   print_functiont   absolute_importi   (   t   *(   t   fmin_l_bfgs_bt   LbfgsInvHessProduct(   t   fmin_tnc(   t   fmin_cobyla(   t
   fmin_slsqp(   t   nnls(   t   basinhopping(   t   linprogt   linprog_verbose_callback(   t   linear_sum_assignment(   t   differential_evolution(   t   least_squarest
   lsq_lineart   _(   t   TesterN((   t   __doc__t
   __future__R    R   R   t   optimizet	   _minimizet   _roott   minpackt   zerost   lbfgsbR   R   t   tncR   t   cobylaR   t   nonlint   slsqpR   R	   t   _basinhoppingR
   t   _linprogR   R   t
   _hungarianR   t   _differentialevolutionR   t   _lsqR   R   t   dirt   st
   startswitht   __all__t   numpy.testingR   t   test(    (    (    s6   /tmp/pip-build-7oUkmx/scipy/scipy/optimize/__init__.pyt   <module>ä   s(   





+