ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gaussher.cpp File Reference

(Last Changed on August 27, 2014 for git-revision dbdbfae70442067ef6b20da218e016c0f8de90b9.)

This file has routines used for Gauss-Hermite Quadrature and Gauss-Legendre Quadrature. More...

#include <fvar.hpp>

Go to the source code of this file.

Functions

void gauss_hermite (const dvector &_t, const dvector &_wts)
 Gauss-Hermite quadature. More...
 
void gauss_legendre (double a, double b, const dvector &_t, const dvector &_wts)
 Gauss-Legendre quadature. More...
 
void gauss_legendre (const dvector &_x, const dvector &_w)
 Gauss-Legendre quadature. More...
 
void imtqlx (const dvector &_d, const dvector &_e, const dvector &_z)
 Diagonalizes a symmetric tridiagonal matrix. More...
 
void normalized_gauss_hermite (const dvector &_x, const dvector &_w)
 Gauss-Hermite quadature. More...
 
double sign (const double x)
 The sign of a number. More...
 

Detailed Description

This file has routines used for Gauss-Hermite Quadrature and Gauss-Legendre Quadrature.

Definition in file gaussher.cpp.

Function Documentation

void gauss_hermite ( const dvector _t,
const dvector _wts 
)

Gauss-Hermite quadature.

Computes a Gauss-Hermite quadrature formula with simple knots.

Parameters
_tarray of abscissa
_wtsarray of corresponding wights

Definition at line 36 of file gaussher.cpp.

Referenced by normalized_gauss_hermite().

void gauss_legendre ( double  a,
double  b,
const dvector _t,
const dvector _wts 
)

Gauss-Legendre quadature.

computes knots and weights of a Gauss-Legendre quadrature formula.

Parameters
aLeft endpoint of interval
bRight endpoint of interval
_tarray of abscissa
_wtsarray of corresponding wights

Definition at line 148 of file gaussher.cpp.

Referenced by gauss_legendre().

void gauss_legendre ( const dvector _x,
const dvector _w 
)

Gauss-Legendre quadature.

Parameters
_xarray of abscissa
_warray of corresponding wights

Definition at line 331 of file gaussher.cpp.

void imtqlx ( const dvector _d,
const dvector _e,
const dvector _z 
)

Diagonalizes a symmetric tridiagonal matrix.

Parameters
_ddiagonal entries
_ethe subdiagonals
_za vector

Definition at line 359 of file gaussher.cpp.

Referenced by gauss_hermite(), and gauss_legendre().

void normalized_gauss_hermite ( const dvector _x,
const dvector _w 
)

Gauss-Hermite quadature.

this is normlaized so that standard normal density integrates to 1

Parameters
_xarray of abscissa
_warray of corresponding wights

Definition at line 343 of file gaussher.cpp.

Referenced by gauss_hermite_stuff::gauss_hermite_stuff().

double sign ( const double  x)

The sign of a number.

Parameters
xDouble

Definition at line 25 of file gaussher.cpp.

Referenced by csolve(), imtqlx(), itoa(), function_minimizer::likeprof_routine(), and solve().