ADMB Documentation  11.1x.2738
 All Classes Files Functions Variables Typedefs Friends Defines
Functions
gaussher.cpp File Reference

(* $Id: gaussher.cpp 2259 2014-08-27 23:16:51Z johnoel $)

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.
void gauss_legendre (double a, double b, const dvector &_t, const dvector &_wts)
 Gauss-Legendre quadature.
void gauss_legendre (const dvector &_x, const dvector &_w)
 Gauss-Legendre quadature.
void imtqlx (const dvector &_d, const dvector &_e, const dvector &_z)
 Diagonalizes a symmetric tridiagonal matrix.
void normalized_gauss_hermite (const dvector &_x, const dvector &_w)
 Gauss-Hermite quadature.
double sign (const double x)
 The sign of a number.

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().