Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions
hybrids_base Class Reference

Base functions for gsl_mroot_hybrids.

#include <gsl_mroot_hybrids.h>

Inheritance diagram for hybrids_base:
gsl_mroot_hybrids< func_t, vec_t, alloc_vec_t, alloc_t, mat_t, alloc_mat_t, mat_alloc_t, jfunc_t >

Detailed Description

Definition at line 62 of file gsl_mroot_hybrids.h.

Public Member Functions

double compute_actual_reduction (double fnorm0, double fnorm1)
 Compute the actual reduction.
double compute_predicted_reduction (double fnorm0, double fnorm1)
 Compute the predicted reduction phi1p=|Q^T f + R dx|.
template<class vec2_t >
void compute_Rg (size_t N, const omatrix_base &r2, const ovector_base &gradient2, vec2_t &Rg)
 Compute $ R \cdot g $ where g is the gradient .
template<class vec2_t >
void compute_wv (size_t n, const ovector_base &qtdf2, const ovector_base &rdx2, const vec2_t &dx2, const ovector_base &diag2, double pnorm, ovector_base &w2, ovector_base &v2)
 Compute w and v.
template<class vec2_t >
void compute_rdx (size_t N, const omatrix_base &r2, const vec2_t &dx2, ovector_base &rdx2)
 Compute $ R \cdot \mathrm{dx} $.
template<class vec2_t , class vec3_t >
double scaled_enorm (size_t n, const vec2_t &d, const vec3_t &ff)
 Compute the norm of the vector $ \vec{v} $ defined by $ v_i = d_i ff_i $.
template<class vec2_t >
double compute_delta (size_t n, ovector_base &diag2, vec2_t &x2)
 Compute delta.
template<class vec2_t >
double enorm (size_t N, const vec2_t &ff)
 Compute the Euclidean norm of ff.
double enorm_sum (size_t n, const ovector_base &a, const ovector_base &b)
 Compute the Euclidean norm of the sum of a and b.
template<class vec2_t >
int compute_trial_step (size_t N, vec2_t &xl, vec2_t &dxl, vec2_t &xx_trial)
 Compute a trial step and put the result in xx_trial.
template<class vec2_t >
int compute_df (size_t n, const vec2_t &ff_trial, const vec2_t &fl, ovector_base &dfl)
 Compute the change in the function value.
template<class mat2_t >
void compute_diag (size_t n, const mat2_t &J2, ovector_base &diag2)
 Compute diag, the norm of the columns of the Jacobian.
template<class vec2_t , class vec3_t , class vec4_t >
void compute_qtf (size_t N, const vec2_t &q2, const vec3_t &f2, vec4_t &qtf2)
 Compute $ Q^{T} f $.
template<class mat2_t >
void update_diag (size_t n, const mat2_t &J2, ovector_base &diag2)
 Update diag.
template<class vec2_t >
void scaled_addition (size_t N, double alpha, ovector_base &newton2, double beta, ovector_base &gradient2, vec2_t &pp)
 Form appropriate convex combination of the Gauss-Newton direction and the scaled gradient direction.
int newton_direction (const size_t N, const omatrix_base &r2, const ovector_base &qtf2, ovector_base &p)
 Compute the Gauss-Newton direction.
void gradient_direction (const size_t M, const size_t N, const omatrix_base &r2, const ovector_base &qtf2, const ovector_base &diag2, ovector_base &g)
 Compute the gradient direction.
void minimum_step (const size_t N, double gnorm, const ovector_base &diag2, ovector_base &g)
 Compute the point at which the gradient is minimized.
template<class vec2_t >
int dogleg (size_t n, const omatrix_base &r2, const ovector_base &qtf2, const ovector_base &diag2, double delta2, ovector_base &newton2, ovector_base &gradient2, vec2_t &p)
 Take a dogleg step.

Member Function Documentation

template<class vec2_t >
double hybrids_base::enorm ( size_t  N,
const vec2_t &  ff 
) [inline]
Idea for Future:
Replace this with dnrm2 from cblas_base.h

Definition at line 162 of file gsl_mroot_hybrids.h.

template<class vec2_t >
int hybrids_base::compute_trial_step ( size_t  N,
vec2_t &  xl,
vec2_t &  dxl,
vec2_t &  xx_trial 
) [inline]
Idea for Future:
Replace with daxpy.

Definition at line 187 of file gsl_mroot_hybrids.h.

template<class vec2_t >
int hybrids_base::compute_df ( size_t  n,
const vec2_t &  ff_trial,
const vec2_t &  fl,
ovector_base dfl 
) [inline]
Idea for Future:
Replace with daxpy?

Definition at line 200 of file gsl_mroot_hybrids.h.

template<class vec2_t , class vec3_t , class vec4_t >
void hybrids_base::compute_qtf ( size_t  N,
const vec2_t &  q2,
const vec3_t &  f2,
vec4_t &  qtf2 
) [inline]
Idea for Future:
This is just right-multiplication, so we could use the O2scl cblas routines instead.

Definition at line 233 of file gsl_mroot_hybrids.h.

template<class vec2_t >
void hybrids_base::scaled_addition ( size_t  N,
double  alpha,
ovector_base newton2,
double  beta,
ovector_base gradient2,
vec2_t &  pp 
) [inline]

Using the Gauss-Newton direction given in newton (a vector of size N), and the gradient direction in gradient (also a vector of size N), this computes

\[ \mathrm{pp}=\alpha \mathrm{newton}+\beta \mathrm{gradient} \]

Definition at line 279 of file gsl_mroot_hybrids.h.

template<class vec2_t >
int hybrids_base::dogleg ( size_t  n,
const omatrix_base r2,
const ovector_base qtf2,
const ovector_base diag2,
double  delta2,
ovector_base newton2,
ovector_base gradient2,
vec2_t &  p 
) [inline]

Given the QR decomposition of an n by n matrix "A", a diagonal matrix diag, a vector b, and a positive number delta, this function determines the convex combination x of the Gauss-Newton and scaled gradient directions which minimizes $ A x-b $ in the least squares sense, subject to the restriction that the Euclidean norm of $ d x $ is smaller than the value of delta.

Definition at line 344 of file gsl_mroot_hybrids.h.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.