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
imatrix Class Reference

Description not yet available. More...

#include <imatrix.h>

Public Member Functions

 imatrix (int, int)
 Construct integer matrix with row dimension [nrl to nrh] where each column is empty. More...
 
 imatrix (int nrl, int nrh, const ivector &iv)
 Construct integer matrix with row dimension [nrl to nrh] where columns of imatrix references column. More...
 
 imatrix (int, int, int, int)
 Construct integer matrix with the dimensions [nrl to nrh] x [ncl to nch]. More...
 
 imatrix (int, int, int, const ivector &)
 Description not yet available. More...
 
 imatrix (int, int, const ivector &, const ivector &)
 Description not yet available. More...
 
 imatrix (const ad_integer &nrl, const ad_integer &nrh, const index_type &ncl, const index_type &nch)
 Description not yet available. More...
 
 imatrix (const imatrix &)
 Copy constructor - Shallow. More...
 
 imatrix (const imatrix_position &)
 Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...
 
 imatrix (void)
 Default constructor. More...
 
 ~imatrix ()
 Destructor. More...
 
void allocate (void)
 Does not allocate, but initializes imatrix members. More...
 
void allocate (int nrl, int nrh, const ivector &iv)
 Allocate integer matrix with row dimension [nrl to nrh] where columns of imatrix references column. More...
 
void allocate (const imatrix &dm)
 Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...
 
void allocate (int nrl, int nrh, int ncl, int nch)
 Allocate integer matrix with the dimensions [nrl to nrh] x [ncl to nch]. More...
 
void allocate (int nrl, int nrh)
 Allocate integer matrix with row dimension [nrl to nrh] where each column is empty. More...
 
void allocate (int nrl, int nrh, int ncl, const ivector &nch)
 Allocate ragged matrix with dimensions [nrl to nrh] x [ncl to nch] where nch is vector of upper column indexes. More...
 
void allocate (int nrl, int nrh, const ivector &ncl, const ivector &nch)
 Allocate ragged matrix with dimensions [nrl to nrh] x [ncl to nch] where ncl and nch are vectors on lower and upper column indexes. More...
 
void allocate (const ad_integer &nrl, const ad_integer &nrh, const index_type &ncl, const index_type &nch)
 Allocate matrix on integers with dimension [nrl to nrh] x [ncl to nch]. More...
 
ivectorbegin () const
 
void colfill_seqadd (int, int, int)
 Fills column of a matrix with a sequence of the form base, base+offset, base+2*offset,... More...
 
int colmax (void) const
 
int colmin (void) const
 
unsigned int colsize () const
 Returns the number of columns. More...
 
void deallocate ()
 Deallocate imatrix memory. More...
 
ivectorelem (int i)
 
const ivectorelem (int i) const
 
int & elem (int i, int j)
 
const int & elem (int i, int j) const
 
ivectorend () const
 
void fill_seqadd (int, int)
 Fill imatrix with sequence of integers from start and adding with increment. More...
 
unsigned int get_ncopies () const
 
int indexmax () const
 
int indexmin () const
 
void initialize (void)
 Description not yet available. More...
 
bool is_valid_row (const int i) const
 Check index i is in matrix row bounds [index_min, index_max]. More...
 
int operator! (void) const
 
ivectoroperator() (int)
 
int & operator() (int, int)
 
const ivectoroperator() (int) const
 
const int & operator() (int, int) const
 
imatrixoperator= (const imatrix &t)
 Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...
 
imatrixoperator= (const int)
 Assigns value to all elements of imatrix. More...
 
ivectoroperator[] (int)
 
const ivectoroperator[] (int) const
 
void read_from (const istream &)
 
void read_from (const uistream &)
 
imatrix_position restore_imatrix_position (void)
 
imatrix restore_imatrix_value (const imatrix_position &mpos)
 
int rowmax () const
 
int rowmin () const
 
void rowshift (int min)
 Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...
 
unsigned int rowsize () const
 Returns the number of rows. More...
 
void save_imatrix_position ()
 Saves the size and address information for a imatrix. More...
 
void save_imatrix_value ()
 Saves the size, address, and value information for a imatrix. More...
 
void shallow_copy (const imatrix &)
 Shallow copy other data structure pointers. More...
 
imatrix sub (int, int)
 Description not yet available. More...
 
void write_on (const ostream &) const
 
void write_on (const uostream &) const
 

Protected Attributes

int index_max
 
int index_min
 
ivectorm
 
mat_shapexshape
 

Friends

char * fform (const char *, const dmatrix &)
 
class i3_array
 

Detailed Description

Description not yet available.

Parameters

Definition at line 69 of file imatrix.h.

Constructor & Destructor Documentation

imatrix::imatrix ( int  nrl,
int  nrh 
)

Construct integer matrix with row dimension [nrl to nrh] where each column is empty.

Parameters
nrllower row index
nrhupper row index

Definition at line 36 of file imat.cpp.

imatrix::imatrix ( int  nrl,
int  nrh,
const ivector column 
)

Construct integer matrix with row dimension [nrl to nrh] where columns of imatrix references column.

Parameters
nrllower row index
nrhupper row index
columnfor columns for imatrix

Definition at line 91 of file imat.cpp.

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

Construct integer matrix with the dimensions [nrl to nrh] x [ncl to nch].

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

Definition at line 70 of file imat.cpp.

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

Description not yet available.

Parameters

Definition at line 232 of file imat.cpp.

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

Description not yet available.

Parameters

Definition at line 223 of file imat.cpp.

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

Description not yet available.

Parameters

Definition at line 78 of file imat.cpp.

imatrix::imatrix ( const imatrix other)

Copy constructor - Shallow.

Definition at line 191 of file imat.cpp.

imatrix::imatrix ( const imatrix_position position)

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

Construct imatrix using dimensions in position.

Parameters
positionimatrix_position

Definition at line 12 of file imat_a.cpp.

imatrix::imatrix ( void  )

Default constructor.

Definition at line 238 of file imat.cpp.

Referenced by data_imatrix::allocate().

imatrix::~imatrix ( )

Destructor.

Definition at line 243 of file imat.cpp.

Member Function Documentation

void imatrix::allocate ( void  )
void imatrix::allocate ( int  nrl,
int  nrh,
const ivector column 
)

Allocate integer matrix with row dimension [nrl to nrh] where columns of imatrix references column.

Parameters
nrllower row index
nrhupper row index
columnfor columns for imatrix

Definition at line 103 of file imat.cpp.

void imatrix::allocate ( const imatrix other)

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

Allocate imatrix using dimensions of other.

Parameters
otherimatrix

Definition at line 12 of file imat6.cpp.

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

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

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

Definition at line 127 of file imat.cpp.

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

Allocate integer matrix with row dimension [nrl to nrh] where each column is empty.

Parameters
nrllower row index
nrhupper row index

Definition at line 279 of file imat.cpp.

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

Allocate ragged matrix with dimensions [nrl to nrh] x [ncl to nch] where nch is vector of upper column indexes.

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

Definition at line 178 of file imat.cpp.

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

Allocate ragged matrix with dimensions [nrl to nrh] x [ncl to nch] where ncl and nch are vectors on lower and upper column indexes.

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

Definition at line 155 of file imat.cpp.

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

Allocate matrix on integers with dimension [nrl to nrh] x [ncl to nch].

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

Definition at line 370 of file indextyp.cpp.

ivector* imatrix::begin ( ) const
inline

Definition at line 130 of file imatrix.h.

Referenced by operator=().

void imatrix::colfill_seqadd ( int  j,
int  base,
int  offset 
)

Fills column of a matrix with a sequence of the form base, base+offset, base+2*offset,...

Author
Dave Fournier
Date
2008-03-25
Parameters
jthe column
baseis the starting value
offsetbase+offset,base+offset*2,...,
Returns
imatrix with those value

Definition at line 55 of file ranfill1.cpp.

int imatrix::colmax ( void  ) const
inline

Definition at line 159 of file imatrix.h.

Referenced by colsize(), colsum(), column(), diagonal(), operator*(), operator=(), lmatrix::operator=(), and trans().

int imatrix::colmin ( void  ) const
inline

Definition at line 155 of file imatrix.h.

Referenced by colsize(), colsum(), column(), diagonal(), operator*(), operator=(), lmatrix::operator=(), and trans().

unsigned int imatrix::colsize ( ) const
inline

Returns the number of columns.

Definition at line 170 of file imatrix.h.

void imatrix::deallocate ( void  )

Deallocate imatrix memory.

Definition at line 248 of file imat.cpp.

Referenced by dvar_compressed_triplet::deallocate(), dcompressed_triplet::deallocate(), and ~imatrix().

ivector & imatrix::elem ( int  i)
inline

Definition at line 233 of file imatrix.h.

Referenced by allocate(), fill_seqadd(), imatrix(), and operator=().

const ivector & imatrix::elem ( int  i) const
inline

Definition at line 249 of file imatrix.h.

int& imatrix::elem ( int  i,
int  j 
)
inline

Definition at line 179 of file imatrix.h.

const int& imatrix::elem ( int  i,
int  j 
) const
inline

Definition at line 183 of file imatrix.h.

ivector* imatrix::end ( ) const
inline

Definition at line 134 of file imatrix.h.

Referenced by operator=().

void imatrix::fill_seqadd ( int  start,
int  increment 
)

Fill imatrix with sequence of integers from start and adding with increment.

Parameters
startstarting value
incrementincremental value

Definition at line 69 of file imat8.cpp.

unsigned int imatrix::get_ncopies ( void  ) const
inline

Definition at line 201 of file imatrix.h.

int imatrix::indexmax ( void  ) const
inline
int imatrix::indexmin ( void  ) const
inline
void imatrix::initialize ( void  )
bool imatrix::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 imat1.cpp.

int imatrix::operator! ( void  ) const
inline

Definition at line 78 of file imatrix.h.

ivector & imatrix::operator() ( int  i)
inline

Definition at line 205 of file imatrix.h.

int & imatrix::operator() ( int  i,
int  j 
)
inline

Definition at line 209 of file imatrix.h.

const ivector & imatrix::operator() ( int  i) const
inline

Definition at line 220 of file imatrix.h.

const int & imatrix::operator() ( int  i,
int  j 
) const
inline

Definition at line 224 of file imatrix.h.

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

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

Assigns element values from other to imatrix.

Parameters
otherimatrix

Definition at line 17 of file imat5.cpp.

imatrix & imatrix::operator= ( const int  value)

Assigns value to all elements of imatrix.

Parameters
valueinteger

Definition at line 63 of file imat5.cpp.

ivector & imatrix::operator[] ( int  i)
inline

Definition at line 213 of file imatrix.h.

const ivector & imatrix::operator[] ( int  i) const
inline

Definition at line 228 of file imatrix.h.

void imatrix::read_from ( const istream &  )
void imatrix::read_from ( const uistream )
imatrix_position imatrix::restore_imatrix_position ( void  )
imatrix imatrix::restore_imatrix_value ( const imatrix_position mpos)
int imatrix::rowmax ( void  ) const
inline
int imatrix::rowmin ( void  ) const
inline
void imatrix::rowshift ( int  min)

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

Shift minimum row and maximum row indexes starting starting from min. If the imatrix is empty, no shifting is done and a warning is displayed. Note: rowsize and data for imatrix will remain the same.

Parameters
minnew rowmin.

Definition at line 17 of file imat.cpp.

unsigned int imatrix::rowsize ( void  ) const
inline

Returns the number of rows.

Definition at line 165 of file imatrix.h.

Referenced by allocate(), and end().

void imatrix::save_imatrix_position ( )

Saves the size and address information for a imatrix.

Definition at line 35 of file cmpdif9.cpp.

void imatrix::save_imatrix_value ( )

Saves the size, address, and value information for a imatrix.

Definition at line 20 of file cmpdif9.cpp.

void imatrix::shallow_copy ( const imatrix other)

Shallow copy other data structure pointers.

Parameters
otherimatrix

Definition at line 200 of file imat.cpp.

Referenced by i3_array::i3_array(), imatrix(), and sub().

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

Description not yet available.

Parameters

Definition at line 45 of file imat.cpp.

Referenced by laplace_approximation_calculator::check_hessian_type().

void imatrix::write_on ( const ostream &  ) const
void imatrix::write_on ( const uostream ) const

Friends And Related Function Documentation

char* fform ( const char *  ,
const dmatrix  
)
friend
friend class i3_array
friend

Definition at line 199 of file imatrix.h.

Member Data Documentation

int imatrix::index_max
protected

Definition at line 73 of file imatrix.h.

Referenced by allocate(), is_valid_row(), operator=(), rowmax(), rowshift(), and shallow_copy().

int imatrix::index_min
protected

Definition at line 72 of file imatrix.h.

Referenced by allocate(), is_valid_row(), operator=(), rowmin(), rowshift(), and shallow_copy().

ivector* imatrix::m
protected
mat_shapex* imatrix::shape
protected

Definition at line 75 of file imatrix.h.

Referenced by allocate(), deallocate(), get_ncopies(), operator!(), operator=(), and shallow_copy().


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