ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | Friends | List of all members
dmatrix Class Reference

Description not yet available. More...

#include <fvar.hpp>

Public Member Functions

 dmatrix (void)
 Default constructor. More...
 
 dmatrix (int, int, kkludge_object)
 
 dmatrix (int, int)
 Description not yet available. More...
 
 dmatrix (int, int, int, int)
 Description not yet available. More...
 
 dmatrix (const ad_integer &nrl, const ad_integer &nrh, const index_type &ncl, const index_type &nch)
 Description not yet available. More...
 
 dmatrix (int, int, const ivector &coll, const ivector &colh)
 Description not yet available. More...
 
 dmatrix (int, int, int coll, const ivector &colh)
 Description not yet available. More...
 
 dmatrix (const dvar_matrix_position &)
 Description not yet available. More...
 
 dmatrix (const dmatrix_position &)
 Description not yet available. More...
 
 dmatrix (const dmatrix &)
 Copy constructor. More...
 
 dmatrix (const banded_symmetric_dmatrix &)
 Description not yet available. More...
 
 dmatrix (const banded_lower_triangular_dmatrix &)
 Description not yet available. More...
 
 dmatrix (char *)
 Description not yet available. More...
 
 dmatrix (const tdmatrix &t)
 
 ~dmatrix ()
 Destructor. More...
 
void allocate (void)
 Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...
 
void allocate (const dmatrix &dm)
 Allocate dmatrix using the same dimensions as other. More...
 
void allocate (const dvar_matrix &)
 Description not yet available. More...
 
void allocate (int nrl, int nrh, int ncl, int nch)
 Allocate dmatrix with dimension [nrl to nrh] x [ncl to nch] where ncl to nch are vector of indexes. More...
 
void allocate (int nrl, int nrh)
 Allocate dmatrix with row dimension [nrl to nrh] and empty columns. More...
 
void allocate (ad_integer nrl, ad_integer nrh)
 Allocate dmatrix with row dimension [nrl to nrh] and empty columns. More...
 
void allocate (int nrl, int nrh, int ncl, const ivector &nch)
 Allocate dmatrix with dimension [nrl to nrh] x [ncl to nch] where nch is vector of indexes. More...
 
void allocate (int nrl, int nrh, const ivector &ncl, int nch)
 Allocate dmatrix with dimension [nrl to nrh] x [ncl to nch] where nch is vector of indexes. More...
 
void allocate (const ad_integer &nrl, const ad_integer &nrh, const index_type &ncl, const index_type &nch)
 Allocate matrix with dimensions [nrl to nrh] x [ncl to nch]. More...
 
void allocate (int nrl, int nrh, const ivector &ncl, const ivector &nch)
 Allocate dmatrix with dimension [nrl to nrh] x [ncl to nch] where ncl to nch are vector of indexes. More...
 
dvectorbegin () const
 
void colfill (int j, const dvector &v)
 Fills dmatrix column at index column with values from vec. More...
 
void colfill_randn (const int &j, long int &n)
 Fill random numbers into specified column j of matrix. More...
 
void colfill_randn (const int &j, const random_number_generator &rng)
 Description not yet available. More...
 
void colfill_randn_ni (const int &j, long int &n)
 Description not yet available. More...
 
void colfill_randu (const int &j, long int &n)
 Fill random numbers into specified column j of matrix. More...
 
void colfill_randu (const int &j, const random_number_generator &rng)
 Description not yet available. More...
 
void colfill_randu_ni (const int &j, long int &n)
 Description not yet available. More...
 
void colfill_seqadd (const int &, const int &, const int &)
 
void colfill_seqadd (const int &, double, double)
 Fills dmatrix at index column with elements with values starting from base and incremented by offset. More...
 
int colmax (void) const
 
int colmin (void) const
 
void colshift (int min)
 Description not yet available. More...
 
unsigned int colsize () const
 
void deallocate ()
 Deallocate dmatrix memory. More...
 
friend dvar_matrix::dvar_matrix (const dmatrix &)
 
dvectorelem (int i)
 
double & elem (int i, int j)
 
const dvectorelem (int i) const
 
const double & elem (int i, int j) const
 
dvectorend () const
 
void fill (const char *)
 Fill allocated dmatrix with values from input parameter s. More...
 
void fill_randcau (const random_number_generator &rng)
 Description not yet available. More...
 
void fill_randn (long int &n)
 Fill matrix with random numbers. More...
 
void fill_randn (const random_number_generator &rng)
 Description not yet available. More...
 
void fill_randn_ni (long int &n)
 Description not yet available. More...
 
void fill_randu (long int &n)
 Fill matrix with random numbers. More...
 
void fill_randu (const random_number_generator &rng)
 Description not yet available. More...
 
void fill_randu_ni (long int &n)
 Description not yet available. More...
 
double fill_seqadd (double, double)
 Description not yet available. More...
 
int indexmax () const
 
int indexmin () const
 
void initialize (void)
 Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...
 
bool is_valid_row (const int i) const
 Check index i is in matrix row bounds [index_min, index_max]. More...
 
bool operator! () const
 Returns true if dmatrix is empty, else false. More...
 
dvectoroperator() (int i)
 
const dvectoroperator() (int i) const
 
double & operator() (int i, int j)
 
const double & operator() (int i, int j) const
 
dmatrix operator() (const ivector &t)
 Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...
 
dmatrixoperator*= (double d)
 Multiply value to all elements in dmatrix. More...
 
dmatrixoperator++ (void)
 
dmatrixoperator+= (const dmatrix &t)
 Add element-wise matrix values other to dmatrix. More...
 
dmatrixoperator-- (void)
 
dmatrixoperator-= (const dmatrix &t)
 Substract element-wise matrix values other from dmatrix. More...
 
dmatrixoperator/= (double d)
 Divide value to all elements in dmatrix. More...
 
dmatrixoperator= (const dmatrix &t)
 Assign values in other to dmatrix. More...
 
dmatrixoperator= (double t)
 Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...
 
dvectoroperator[] (int)
 
const dvectoroperator[] (int) const
 
void read_from (const istream &)
 Description not yet available. More...
 
uistreamread_from (const uistream &)
 Read dmatrix from input. More...
 
void rowfill (int j, const dvector &v)
 Fills dmatrix row at index row with values from vec. More...
 
void rowfill_randn (const int &i, long int &n)
 Fill random numbers into specified row i of matrix. More...
 
void rowfill_randn (const int &i, const random_number_generator &rng)
 Description not yet available. More...
 
void rowfill_randn_ni (const int &i, long int &n)
 Description not yet available. More...
 
void rowfill_randu (const int &i, long int &n)
 Fill random numbers into specified row i of matrix. More...
 
void rowfill_randu (const int &i, const random_number_generator &rng)
 Description not yet available. More...
 
void rowfill_randu_ni (const int &i, long int &n)
 Description not yet available. More...
 
void rowfill_seqadd (const int &, double, double)
 Fills dmatrix row at index with elements with values starting from base and incremented by offset. More...
 
int rowmax () const
 
int rowmin () const
 
void rowshift (int min)
 Changes the range of valid indices for the rows. More...
 
unsigned int rowsize () const
 
void save_dmatrix_derivatives (const dvar_matrix_position &pos) const
 Description not yet available. More...
 
void save_dmatrix_derivatives_na (const dvar_matrix_position &pos) const
 Description not yet available. More...
 
void save_dmatrix_position () const
 Saves size and address information for a dmatrix to adjoint data file. More...
 
void save_dmatrix_value () const
 Description not yet available. More...
 
void shallow_copy (const dmatrix &)
 Shallow copy values and dimensions from other to dmatrix. More...
 
dmatrix sub (int, int)
 Description not yet available. More...
 
void write_on (const ostream &) const
 Description not yet available. More...
 
uostreamwrite_on (const uostream &) const
 Write dmatrix to output. More...
 

Protected Attributes

int index_max
 
int index_min
 
dvectorm
 
mat_shapexshape
 

Friends

class banded_lower_triangular_dmatrix
 
class banded_symmetric_dmatrix
 
class d3_array
 
double det (const dmatrix &)
 Compute determinant of a constant matrix. More...
 
class dvar_matrix
 
dvar_matrixdvar_matrix::operator= (const dmatrix &)
 
char * fform (const char *, const dmatrix &)
 
dmatrix inv (const dmatrix &)
 Inverse of a constant matrix by LU decomposition. More...
 
dmatrix inv (const dmatrix &m1, const double &_ln_det, const int &_sgn)
 Inverse of a constant matrix by LU decomposition. More...
 
double ln_det (const dmatrix &m1, int &sgn)
 Compute log determinant of a constant matrix. More...
 
double norm (const dmatrix &)
 Norm of a matrix; constant object. More...
 
double norm2 (const dmatrix &)
 Norm squared of a matrix; constant object. More...
 
dvector operator* (const dvector &, const dmatrix &)
 Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...
 
dvector operator* (const dmatrix &, const dvector &)
 Returns product of AB where A is a dmatrix and B is a dvector. More...
 
dvar_vector operator* (const dvar_vector &, const dmatrix &)
 Description not yet available. More...
 
dvar_vector operator* (const dmatrix &, const dvar_vector &)
 Description not yet available. More...
 
dmatrix operator* (const dmatrix &, const dmatrix &)
 Returns product of AB where A is a dmatrix and B is a dmatrix. More...
 
dvar_matrix operator* (const dvar_matrix &, const dmatrix &)
 Description not yet available. More...
 
dvar_matrix operator* (const dmatrix &, const dvar_matrix &)
 Description not yet available. More...
 
dmatrix operator+ (const dmatrix &, const dmatrix &)
 Description not yet available. More...
 
dvar_matrix operator+ (const dvar_matrix &, const dmatrix &)
 Description not yet available. More...
 
dvar_matrix operator+ (const dmatrix &, const dvar_matrix &)
 Description not yet available. More...
 
dmatrix operator- (const dmatrix &, const dmatrix &)
 Description not yet available. More...
 
double sumsq (const dmatrix &)
 Calls norm2. More...
 
dmatrix trans (const dmatrix &m1)
 Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...
 

Detailed Description

Description not yet available.

Parameters

Definition at line 2819 of file fvar.hpp.

Constructor & Destructor Documentation

dmatrix::dmatrix ( void  )

Default constructor.

Definition at line 16 of file dmat0.cpp.

dmatrix::dmatrix ( int  ,
int  ,
kkludge_object   
)
dmatrix::dmatrix ( int  nrl,
int  nrh 
)

Description not yet available.

Parameters

Definition at line 68 of file dmat.cpp.

dmatrix::dmatrix ( int  nrl,
int  nrh,
int  ncl,
int  nch 
)

Description not yet available.

Parameters

Definition at line 20 of file dmat.cpp.

dmatrix::dmatrix ( const ad_integer nrl,
const ad_integer nrh,
const index_type ncl,
const index_type nch 
)

Description not yet available.

Parameters

Definition at line 197 of file indextyp.cpp.

dmatrix::dmatrix ( int  nrl,
int  nrh,
const ivector ncl,
const ivector nch 
)

Description not yet available.

Parameters

Definition at line 282 of file dmat.cpp.

dmatrix::dmatrix ( int  nrl,
int  nrh,
int  ncl,
const ivector nch 
)

Description not yet available.

Parameters

Definition at line 291 of file dmat.cpp.

dmatrix::dmatrix ( const dvar_matrix_position pos)

Description not yet available.

Parameters

Definition at line 26 of file dmat_a.cpp.

dmatrix::dmatrix ( const dmatrix_position pos)

Description not yet available.

Parameters

Definition at line 88 of file dmat_a.cpp.

dmatrix::dmatrix ( const dmatrix other)

Copy constructor.

Definition at line 297 of file dmat.cpp.

dmatrix::dmatrix ( const banded_symmetric_dmatrix S)

Description not yet available.

Parameters

Definition at line 211 of file dmat28.cpp.

dmatrix::dmatrix ( const banded_lower_triangular_dmatrix S)

Description not yet available.

Parameters

Definition at line 182 of file dmat28.cpp.

dmatrix::dmatrix ( char *  s)

Description not yet available.

Parameters

Definition at line 78 of file dmat_io2.cpp.

dmatrix::~dmatrix ( )

Destructor.

Definition at line 326 of file dmat.cpp.

dmatrix::dmatrix ( const tdmatrix &  t)

Member Function Documentation

void dmatrix::allocate ( void  )
void dmatrix::allocate ( const dmatrix other)

Allocate dmatrix using the same dimensions as other.

Parameters
otherdmatrix

Definition at line 148 of file dmat.cpp.

void dmatrix::allocate ( const dvar_matrix dm)

Description not yet available.

Parameters

Definition at line 17 of file fvar_m33.cpp.

void dmatrix::allocate ( int  nrl,
int  nrh,
int  ncl,
int  nch 
)

Allocate dmatrix with dimension [nrl to nrh] x [ncl to nch] where ncl to nch are vector of indexes.

Parameters
nrllower row index
nrhupper row index
ncllower column index
nchupper column index

Definition at line 33 of file dmat.cpp.

void dmatrix::allocate ( int  nrl,
int  nrh 
)

Allocate dmatrix with row dimension [nrl to nrh] and empty columns.

Parameters
nrllower row index
nrhupper row index

Definition at line 79 of file dmat.cpp.

void dmatrix::allocate ( ad_integer  nrl,
ad_integer  nrh 
)

Allocate dmatrix with row dimension [nrl to nrh] and empty columns.

Parameters
nrllower row index

Definition at line 107 of file dmat.cpp.

void dmatrix::allocate ( int  nrl,
int  nrh,
int  ncl,
const ivector nch 
)

Allocate dmatrix with dimension [nrl to nrh] x [ncl to nch] where nch is vector of indexes.

Parameters
nrllower row index
nrhupper row index
ncllower column index
nchvector of upper column indexes

Definition at line 216 of file dmat.cpp.

void dmatrix::allocate ( int  nrl,
int  nrh,
const ivector ncl,
int  nch 
)

Allocate dmatrix with dimension [nrl to nrh] x [ncl to nch] where nch is vector of indexes.

Parameters
nrllower row index
nrhupper row index
nclvector of lower column indexes
nchupper column index

Definition at line 245 of file dmat.cpp.

void dmatrix::allocate ( const ad_integer nrl,
const ad_integer nrh,
const index_type ncl,
const index_type nch 
)

Allocate matrix with dimensions [nrl to nrh] x [ncl to nch].

Parameters
nrllower matrix row index
nrlupper matrix row index
ncllower matrix column index
nclupper matrix column index

Definition at line 210 of file indextyp.cpp.

void dmatrix::allocate ( int  nrl,
int  nrh,
const ivector ncl,
const ivector nch 
)

Allocate dmatrix with dimension [nrl to nrh] x [ncl to nch] where ncl to nch are vector of indexes.

Parameters
nrllower row index
nrhupper row index
nclvector of lower column indexes
nchvector of upper column indexes

Definition at line 184 of file dmat.cpp.

dvector* dmatrix::begin ( ) const
inline

Definition at line 2900 of file fvar.hpp.

Referenced by end(), initialize(), operator+=(), operator-=(), and operator=().

void dmatrix::colfill ( int  column,
const dvector vec 
)

Fills dmatrix column at index column with values from vec.

Parameters
columnindex
vecvalues to copy

Definition at line 123 of file cranfill.cpp.

void dmatrix::colfill_randn ( const int &  j,
long int &  n 
)

Fill random numbers into specified column j of matrix.

Parameters
jspecified column
nseed

Definition at line 301 of file ranfill.cpp.

void dmatrix::colfill_randn ( const int &  j,
const random_number_generator rng 
)

Description not yet available.

Parameters

Definition at line 328 of file rngen.cpp.

void dmatrix::colfill_randn_ni ( const int &  j,
long int &  n 
)

Description not yet available.

Parameters

Definition at line 175 of file ranf_ni.cpp.

void dmatrix::colfill_randu ( const int &  j,
long int &  n 
)

Fill random numbers into specified column j of matrix.

Parameters
jspecified column
nseed

Definition at line 204 of file ranfill.cpp.

void dmatrix::colfill_randu ( const int &  j,
const random_number_generator rng 
)

Description not yet available.

Parameters

Definition at line 244 of file rngen.cpp.

void dmatrix::colfill_randu_ni ( const int &  j,
long int &  n 
)

Description not yet available.

Parameters

Definition at line 74 of file ranf_ni.cpp.

void dmatrix::colfill_seqadd ( const int &  ,
const int &  ,
const int &   
)
void dmatrix::colfill_seqadd ( const int &  column,
double  base,
double  offset 
)

Fills dmatrix at index column with elements with values starting from base and incremented by offset.

Parameters
rowindex
baseinitial value
offsetincremental value

Definition at line 105 of file cranfill.cpp.

int dmatrix::colmax ( void  ) const
inline
int dmatrix::colmin ( void  ) const
inline
void dmatrix::colshift ( int  min)
unsigned int dmatrix::colsize ( ) const
inline
void dmatrix::deallocate ( void  )
dmatrix::dvar_matrix::dvar_matrix ( const dmatrix )
dvector& dmatrix::elem ( int  i)
inline
double& dmatrix::elem ( int  i,
int  j 
)
inline

Definition at line 3015 of file fvar.hpp.

const dvector& dmatrix::elem ( int  i) const
inline

Definition at line 3019 of file fvar.hpp.

const double& dmatrix::elem ( int  i,
int  j 
) const
inline

Definition at line 3023 of file fvar.hpp.

dvector* dmatrix::end ( ) const
inline

Definition at line 2904 of file fvar.hpp.

Referenced by initialize(), operator+=(), operator-=(), and operator=().

void dmatrix::fill ( const char *  s)

Fill allocated dmatrix with values from input parameter s.

dmatrix m(1, 2, 1, 3);
char values[] = "{0, 1, 2} {3, 4, 5}";
m.fill(values);
Parameters
svalues

Definition at line 29 of file dmat10.cpp.

void dmatrix::fill_randcau ( const random_number_generator rng)

Description not yet available.

Parameters

Definition at line 39 of file drancau.cpp.

Referenced by d3_array::fill_randcau().

void dmatrix::fill_randn ( long int &  n)

Fill matrix with random numbers.

Parameters
nseed

Definition at line 244 of file ranfill.cpp.

Referenced by d3_array::fill_randn(), and laplace_approximation_calculator::generate_antithetical_rvs().

void dmatrix::fill_randn ( const random_number_generator rng)

Description not yet available.

Parameters

Definition at line 280 of file rngen.cpp.

void dmatrix::fill_randn_ni ( long int &  n)

Description not yet available.

Parameters

Definition at line 116 of file ranf_ni.cpp.

Referenced by d3_array::fill_randn(), and d3_array::fill_randn_ni().

void dmatrix::fill_randu ( long int &  n)

Fill matrix with random numbers.

Parameters
nseed

Definition at line 286 of file ranfill.cpp.

Referenced by d3_array::fill_randu(), and laplace_approximation_calculator::laplace_approximation_calculator().

void dmatrix::fill_randu ( const random_number_generator rng)

Description not yet available.

Parameters

Definition at line 316 of file rngen.cpp.

void dmatrix::fill_randu_ni ( long int &  n)

Description not yet available.

Parameters

Definition at line 160 of file ranf_ni.cpp.

Referenced by d3_array::fill_randu(), and d3_array::fill_randu_ni().

double dmatrix::fill_seqadd ( double  x,
double  d 
)

Description not yet available.

Parameters

Definition at line 35 of file dmat21.cpp.

Referenced by derch(), d3_array::fill_seqadd(), and print_is_diagnostics().

int dmatrix::indexmax ( void  ) const
inline
int dmatrix::indexmin ( void  ) const
inline
void dmatrix::initialize ( void  )

Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.

Initalize all elements of dmatrix to zero.

Definition at line 12 of file dmat7.cpp.

Referenced by ageLengthKey(), function_minimizer::calculate_chd_and_inverse(), check_second_derivatives(), choleski_decomp(), choleski_decomp_error(), function_minimizer::choleski_decomp_hmc(), choleski_decomp_neghess_error(), choleski_decomp_positive(), cmdm_prod(), laplace_approximation_calculator::default_calculations_check_derivatives(), df_ln_det_choleski(), df_xdet(), df_xldet(), dfcholeski_decomp(), dfcholeski_decomp_positive(), dfempirical_covarv(), dfempirical_covarv_partial(), dfinvpret(), dfmatinit(), dmcm_prod(), dmcv_prod(), dmdm_prod(), dmdv_prod(), dmdv_solve(), laplace_approximation_calculator::do_newton_raphson_banded(), laplace_approximation_calculator::do_separable_stuff_laplace_approximation_block_diagonal(), laplace_approximation_calculator::do_separable_stuff_laplace_approximation_importance_sampling_adjoint(), laplace_approximation_calculator::do_separable_stuff_newton_raphson_block_diagonal(), laplace_approximation_calculator::do_separable_stuff_x_u_block_diagonal(), dvdm_prod(), eigenvalues(), eigenvectors(), expm(), fcomp1(), function_minimizer::get_bigS(), laplace_approximation_calculator::get_block_diagonal_hessian(), laplace_approximation_calculator::get_complete_hessian(), get_second_ders(), get_solution_vector(), function_minimizer::hybrid_mcmc_routine(), identity_matrix(), d3_array::initialize(), function_minimizer::likeprof_routine(), ln_det_choleski(), ln_det_choleski_error(), lower_triangular_choleski_decomp_positive(), make_dmatrix(), make_preliminary_hist(), make_sdmatrix(), MAT(), function_minimizer::mcmc_routine(), function_minimizer::nuts_mcmc_routine(), read_hist_data(), function_minimizer::rwm_mcmc_routine(), function_minimizer::sd_routine(), seldif_basis(), and function_minimizer::shmc_mcmc_routine().

bool dmatrix::is_valid_row ( const int  i) const

Check index i is in matrix row bounds [index_min, index_max].

Parameters
irow index

Definition at line 19 of file dmat8.cpp.

bool dmatrix::operator! ( ) const
inline

Returns true if dmatrix is empty, else false.

Definition at line 2846 of file fvar.hpp.

dvector & dmatrix::operator() ( int  i)
inline

Definition at line 3083 of file fvar.hpp.

Referenced by operator()().

const dvector & dmatrix::operator() ( int  i) const
inline

Definition at line 3091 of file fvar.hpp.

double& dmatrix::operator() ( int  i,
int  j 
)
inline

Definition at line 2998 of file fvar.hpp.

const double& dmatrix::operator() ( int  i,
int  j 
) const
inline

Definition at line 3002 of file fvar.hpp.

dmatrix dmatrix::operator() ( const ivector indexes)

Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.

Returns a selected vector of rows from ivector using positions in indexes, then for each selected row select only values each position in indexes.

Note: Assumes positions are in range [indexmin() to indexmax()].

Parameters
indexescontains vector of valid index values

Definition at line 16 of file dmat18.cpp.

dmatrix & dmatrix::operator*= ( double  d)

Multiply value to all elements in dmatrix.

Parameters
valuedouble

Definition at line 48 of file dmat22.cpp.

dmatrix& dmatrix::operator++ ( void  )
inline

Definition at line 2836 of file fvar.hpp.

dmatrix & dmatrix::operator+= ( const dmatrix other)

Add element-wise matrix values other to dmatrix.

Parameters
otherdmatrix

Definition at line 73 of file dmat4.cpp.

dmatrix& dmatrix::operator-- ( void  )
inline

Definition at line 2829 of file fvar.hpp.

dmatrix & dmatrix::operator-= ( const dmatrix other)

Substract element-wise matrix values other from dmatrix.

Parameters
otherdmatrix

Definition at line 100 of file dmat4.cpp.

dmatrix & dmatrix::operator/= ( double  d)

Divide value to all elements in dmatrix.

Parameters
valuedouble

Definition at line 35 of file dmat22.cpp.

dmatrix & dmatrix::operator= ( const dmatrix other)

Assign values in other to dmatrix.

Parameters
otherdmatrix

Definition at line 27 of file dmat4.cpp.

Referenced by named_dmatrix::operator=().

dmatrix & dmatrix::operator= ( double  t)

Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.

Assign value x to all elements in dmatrix.

Parameters
valuedouble

Definition at line 22 of file dmat22.cpp.

dvector & dmatrix::operator[] ( int  i)
inline

Definition at line 3087 of file fvar.hpp.

const dvector & dmatrix::operator[] ( int  i) const
inline

Definition at line 3095 of file fvar.hpp.

void dmatrix::read_from ( const istream &  s)

Description not yet available.

Parameters

Definition at line 91 of file dmat_io.cpp.

Referenced by operator>>().

uistream & dmatrix::read_from ( const uistream input)

Read dmatrix from input.

Parameters
inputuistream

Definition at line 35 of file dmat_io3.cpp.

void dmatrix::rowfill ( int  row,
const dvector vec 
)

Fills dmatrix row at index row with values from vec.

Parameters
rowindex
vecvalues to copy

Definition at line 136 of file cranfill.cpp.

void dmatrix::rowfill_randn ( const int &  i,
long int &  n 
)

Fill random numbers into specified row i of matrix.

Parameters
ispecified row
nseed

Definition at line 315 of file ranfill.cpp.

void dmatrix::rowfill_randn ( const int &  i,
const random_number_generator rng 
)

Description not yet available.

Parameters

Definition at line 340 of file rngen.cpp.

void dmatrix::rowfill_randn_ni ( const int &  i,
long int &  n 
)

Description not yet available.

Parameters

Definition at line 189 of file ranf_ni.cpp.

void dmatrix::rowfill_randu ( const int &  i,
long int &  n 
)

Fill random numbers into specified row i of matrix.

Parameters
ispecified row
nseed

Definition at line 218 of file ranfill.cpp.

void dmatrix::rowfill_randu ( const int &  i,
const random_number_generator rng 
)

Description not yet available.

Parameters

Definition at line 256 of file rngen.cpp.

void dmatrix::rowfill_randu_ni ( const int &  i,
long int &  n 
)

Description not yet available.

Parameters

Definition at line 88 of file ranf_ni.cpp.

void dmatrix::rowfill_seqadd ( const int &  row,
double  base,
double  offset 
)

Fills dmatrix row at index with elements with values starting from base and incremented by offset.

Parameters
rowindex
baseinitial value
offsetincremental value

Definition at line 148 of file cranfill.cpp.

int dmatrix::rowmax ( void  ) const
inline

Definition at line 2929 of file fvar.hpp.

Referenced by dvar_matrix::allocate(), allocate(), param_init_bounded_number_vector::allocate(), sdmatrix::allocate(), choleski_decomp(), choleski_decomp_error(), function_minimizer::choleski_decomp_hmc(), choleski_decomp_neghess_error(), choleski_decomp_positive(), cmdm_prod(), cmdv_prod(), colfill(), colfill_randn(), colfill_randn_ni(), colfill_randu(), colfill_randu_ni(), colfill_seqadd(), colshift(), colsum(), cos(), cube(), det(), df_ln_det_choleski(), dfcholeski_decomp(), dfcholeski_decomp_positive(), dmatrix(), dmatrix_position::dmatrix_position(), dmcm_prod(), dmcv_prod(), dmdm_prod(), dmdv_prod(), dmultinom(), dmvlogistic(), elem_div(), elem_prod(), exp(), expm(), extract_column(), extract_row(), fabs(), fill(), fill_randcau(), fill_randn(), fill_randn_ni(), fill_randu(), fill_randu_ni(), fill_seqadd(), indexmax(), dmatrix_index::indexmax(), initialize(), inv(), ln_det(), ln_det_choleski(), ln_det_choleski_error(), log(), lower_triangular_choleski_decomp_positive(), matrix2vector(), max(), mfexp(), min(), nograd_assign(), nograd_assign_trans(), norm(), norm2(), function_minimizer::normalize_posterior_distribution(), operator*(), operator*=(), operator+(), dvar_matrix::operator+=(), operator+=(), operator-(), dvar_matrix::operator-=(), operator-=(), operator/(), operator/=(), dvar_matrix::operator=(), operator=(), pow(), read_from(), DF_FILE::restore_dmatrix_value(), DF_FILE::restore_dvar_matrix_value(), function_minimizer::rotate_pars(), banded_symmetric_dmatrix::rowmax(), banded_lower_triangular_dmatrix::rowmax(), rowsize(), rowsum(), save_dmatrix_derivatives(), save_dmatrix_derivatives_na(), DF_FILE::save_dmatrix_position(), DF_FILE::save_dmatrix_value(), set_value_inv(), sin(), size_count(), size_count_partial(), solve(), sort(), sqr(), sqrt(), square(), sum(), symmetrize(), tan(), trace(), trans(), use_shape(), write_on(), and dll_data_matrix::~dll_data_matrix().

int dmatrix::rowmin ( void  ) const
inline

Definition at line 2925 of file fvar.hpp.

Referenced by dvar_matrix::allocate(), allocate(), param_init_bounded_number_vector::allocate(), sdmatrix::allocate(), begin(), choleski_decomp(), choleski_decomp_error(), function_minimizer::choleski_decomp_hmc(), choleski_decomp_neghess_error(), choleski_decomp_positive(), cmdm_prod(), cmdv_prod(), colfill(), colfill_randn(), colfill_randn_ni(), colfill_randu(), colfill_randu_ni(), colfill_seqadd(), colshift(), colsum(), cos(), cube(), det(), df_ln_det_choleski(), dfcholeski_decomp(), dfcholeski_decomp_positive(), dmatrix(), dmatrix_position::dmatrix_position(), dmcm_prod(), dmcv_prod(), dmdm_prod(), dmdv_prod(), dmultinom(), dmvlogistic(), elem_div(), elem_prod(), exp(), expm(), extract_column(), extract_row(), fabs(), fill(), fill_randcau(), fill_randn(), fill_randn_ni(), fill_randu(), fill_randu_ni(), fill_seqadd(), indexmin(), dmatrix_index::indexmin(), initialize(), inv(), ln_det(), log(), lower_triangular_choleski_decomp_positive(), matrix2vector(), max(), mfexp(), min(), nograd_assign(), nograd_assign_trans(), norm(), norm2(), function_minimizer::normalize_posterior_distribution(), operator*(), operator*=(), operator+(), dvar_matrix::operator+=(), operator+=(), operator-(), dvar_matrix::operator-=(), operator-=(), operator/(), operator/=(), dvar_matrix::operator=(), operator=(), pow(), read_from(), DF_FILE::restore_dmatrix_value(), DF_FILE::restore_dvar_matrix_value(), function_minimizer::rotate_pars(), banded_symmetric_dmatrix::rowmin(), banded_lower_triangular_dmatrix::rowmin(), rowshift(), rowsize(), rowsum(), save_dmatrix_derivatives(), save_dmatrix_derivatives_na(), DF_FILE::save_dmatrix_position(), DF_FILE::save_dmatrix_value(), set_value_inv(), sin(), size_count(), size_count_partial(), solve(), sort(), sqr(), sqrt(), square(), sum(), svd(), symmetrize(), tan(), trace(), trans(), use_shape(), write_on(), and dll_data_matrix::~dll_data_matrix().

void dmatrix::rowshift ( int  min)
unsigned int dmatrix::rowsize ( ) const
inline
void dmatrix::save_dmatrix_derivatives ( const dvar_matrix_position _pos) const
void dmatrix::save_dmatrix_derivatives_na ( const dvar_matrix_position _pos) const

Description not yet available.

Parameters

Definition at line 312 of file cmpdif5.cpp.

Referenced by dfmatinit().

void dmatrix::save_dmatrix_position ( ) const

Saves size and address information for a dmatrix to adjoint data file.

Definition at line 27 of file cmpdif6.cpp.

void dmatrix::save_dmatrix_value ( ) const

Description not yet available.

Parameters

Definition at line 22 of file cmpdif5.cpp.

void dmatrix::shallow_copy ( const dmatrix other)

Shallow copy values and dimensions from other to dmatrix.

Parameters
otherdmatrix

Definition at line 307 of file dmat.cpp.

Referenced by dmatrix(), and sub().

dmatrix dmatrix::sub ( int  nrl,
int  nrh 
)

Description not yet available.

Parameters

Definition at line 47 of file dmat.cpp.

Referenced by orthpoly().

void dmatrix::write_on ( const ostream &  _s) const

Description not yet available.

Parameters

Definition at line 46 of file dmat_io.cpp.

Referenced by operator<<().

uostream & dmatrix::write_on ( const uostream output) const

Write dmatrix to output.

Parameters
outputuostream

Definition at line 64 of file dmat_io3.cpp.

Friends And Related Function Documentation

friend class banded_lower_triangular_dmatrix
friend

Definition at line 2871 of file fvar.hpp.

friend class banded_symmetric_dmatrix
friend

Definition at line 2870 of file fvar.hpp.

friend class d3_array
friend

Definition at line 3027 of file fvar.hpp.

double det ( const dmatrix m1)
friend

Compute determinant of a constant matrix.

Parameters
m1A dmatrix, $M$, for which the determinant is computed.
Returns
A double containing $|M|$.

The implementation of this algorithm was inspired by "Numerical Recipes in C", 2nd edition, Press, Teukolsky, Vetterling, Flannery, chapter 2

Definition at line 499 of file dmat3.cpp.

friend class dvar_matrix
friend

Definition at line 2827 of file fvar.hpp.

dvar_matrix& dvar_matrix::operator= ( const dmatrix )
friend
char* fform ( const char *  ,
const dmatrix  
)
friend
dmatrix inv ( const dmatrix m1)
friend

Inverse of a constant matrix by LU decomposition.

Parameters
m1A dmatrix, $M$, for which the inverse is to be computed.
Returns
A dmatrix containing $M^{-1}$.

The implementation of this algorithm was inspired by "Numerical Recipes in C", 2nd edition, Press, Teukolsky, Vetterling, Flannery, chapter 2

Definition at line 37 of file dmat3.cpp.

dmatrix inv ( const dmatrix m1,
const double &  _ln_det,
const int &  _sgn 
)
friend

Inverse of a constant matrix by LU decomposition.

Parameters
m1A dmatrix, $M$, for which the inverse is to be computed.
_ln_detOn return contains $|\log M|$
_sign
Returns
A dmatrix containing $M^{-1}$.

The implementation of this algorithm was inspired by "Numerical Recipes in C", 2nd edition, Press, Teukolsky, Vetterling, Flannery, chapter 2

Definition at line 114 of file dmat3.cpp.

double ln_det ( const dmatrix m1,
int &  sgn 
)
friend

Compute log determinant of a constant matrix.

Parameters
m1A dmatrix, $M$, for which the determinant is computed.
_sgn
Returns
A double containing $|\log(M)|$.

The implementation of this algorithm was inspired by "Numerical Recipes in C", 2nd edition, Press, Teukolsky, Vetterling, Flannery, chapter 2

Definition at line 536 of file dmat3.cpp.

double norm ( const dmatrix m1)
friend

Norm of a matrix; constant object.

Parameters
m1a matrix, $M$
Returns
$||M||$

Definition at line 31 of file dmat2.cpp.

double norm2 ( const dmatrix m1)
friend

Norm squared of a matrix; constant object.

Parameters
m1a matrix, $M$
Returns
$||M||^2$

Definition at line 50 of file dmat2.cpp.

dvector operator* ( const dvector A,
const dmatrix B 
)
friend

Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.

Returns product of AB where A is a vector and B is a matrix.

Parameters
vecdvector
matdmatrix

Definition at line 18 of file dmat1.cpp.

dvector operator* ( const dmatrix A,
const dvector B 
)
friend

Returns product of AB where A is a dmatrix and B is a dvector.

Parameters
Admatrix
Bdvector

Definition at line 82 of file dmat1.cpp.

dvar_vector operator* ( const dvar_vector x,
const dmatrix m 
)
friend

Description not yet available.

Parameters

Definition at line 108 of file fvar_m23.cpp.

dvar_vector operator* ( const dmatrix m,
const dvar_vector x 
)
friend

Description not yet available.

Parameters

Definition at line 134 of file fvar_m22.cpp.

dmatrix operator* ( const dmatrix A,
const dmatrix B 
)
friend

Returns product of AB where A is a dmatrix and B is a dmatrix.

Parameters
Admatrix
Bdmatrix

Definition at line 149 of file dmat1.cpp.

dvar_matrix operator* ( const dvar_matrix m1,
const dmatrix cm2 
)
friend

Description not yet available.

Parameters

Definition at line 35 of file fvar_m19.cpp.

dvar_matrix operator* ( const dmatrix cm1,
const dvar_matrix m2 
)
friend

Description not yet available.

Parameters

Definition at line 32 of file fvar_m18.cpp.

dmatrix operator+ ( const dmatrix m1,
const dmatrix m2 
)
friend

Description not yet available.

Parameters

Definition at line 40 of file dmat16.cpp.

dvar_matrix operator+ ( const dvar_matrix m1,
const dmatrix m2 
)
friend

Description not yet available.

Parameters

Definition at line 17 of file fvar_ma2.cpp.

dvar_matrix operator+ ( const dmatrix m1,
const dvar_matrix m2 
)
friend

Description not yet available.

Parameters

Definition at line 72 of file fvar_ma2.cpp.

dmatrix operator- ( const dmatrix m1,
const dmatrix m2 
)
friend

Description not yet available.

Parameters

Definition at line 17 of file dmat16.cpp.

double sumsq ( const dmatrix m1)
friend

Calls norm2.

Parameters
m1a matrix, $M$
Returns
norm2 of m1

Definition at line 69 of file dmat2.cpp.

dmatrix trans ( const dmatrix m1)
friend

Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.

Transpose of a matrix; constant objects.

Parameters
m1The matrix, $M$, to be transposed.
Returns
$M^T$

Definition at line 13 of file dmat2.cpp.

Member Data Documentation

int dmatrix::index_max
protected
int dmatrix::index_min
protected
dvector* dmatrix::m
protected
mat_shapex* dmatrix::shape
protected

The documentation for this class was generated from the following files: