Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python35
/
lib64
/
python3.5
/
site-packages
/
scipy
/
optimize
/
__pycache__
/
File Content:
_trustregion.cpython-35.opt-1.pyc
�<WW�! � @ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l m Z m Z m Z m Z g Z Gd d � d e � Z f d d d d d d d d d d d d d d � Z d S)zTrust-region optimization.� )�division�print_function�absolute_importN� )�_check_unknown_options� wrap_function�_status_message�OptimizeResultc @ s� e Z d Z d Z d d d d � Z d d � Z e d d � � Z e d d � � Z e d d � � Z d d � Z e d d � � Z d d � Z d d � Z d S)�BaseQuadraticSubproblemaQ Base/abstract class defining the quadratic model for trust-region minimization. Child classes must implement the ``solve`` method. Values of the objective function, jacobian and hessian (if provided) at the current iterate ``x`` are evaluated on demand and then stored as attributes ``fun``, ``jac``, ``hess``. Nc C sg | | _ d | _ d | _ d | _ d | _ d | _ d | _ | | _ | | _ | | _ | | _ d S)N)�_x�_f�_g�_h�_g_magZ _cauchy_pointZ _newton_point�_fun�_jac�_hess�_hessp)�self�x�fun�jac�hess�hessp� r �/_trustregion.py�__init__ s z BaseQuadraticSubproblem.__init__c C s7 | j t j | j | � d t j | | j | � � S)Ng �?)r �np�dotr r )r �pr r r �__call__% s z BaseQuadraticSubproblem.__call__c C s+ | j d k r$ | j | j � | _ | j S)z1Value of objective function at current iteration.N)r r r )r r r r r ( s zBaseQuadraticSubproblem.func C s+ | j d k r$ | j | j � | _ | j S)z=Value of jacobian of objective function at current iteration.N)r r r )r r r r r / s zBaseQuadraticSubproblem.jacc C s+ | j d k r$ | j | j � | _ | j S)z<Value of hessian of objective function at current iteration.N)r r r )r r r r r 6 s zBaseQuadraticSubproblem.hessc C s9 | j d k r"