ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
Defines | Functions
gdbprintlib.cpp File Reference

(// $Id$)

Source code for functions for printing ADMB objects during GDB sessions. More...

#include "gdbprintlib.h"

Go to the source code of this file.

Defines

#define _GDBPRINT_CPP_

Functions

void pad ()
 Do nothing, this will be included by ADMB lexical analyzer so that the library is usable from within GDB.
void pad (double v)
 Print a double precision number to the screen.
void pad (const adstring &v)
 Print an adstring to the screen.
void pad (const dvar3_array &v)
 Print a dvar3_array to the screen.
void pad (const dvar3_array &v, int i)
 Print a matrix slice of a dvar3_array to the screen.
void pad (const dvar3_array &v, int i, int j)
 Print a vector slice of a dvar3_array to the screen.
void pad (const dvar3_array &v, int i, int j, int k)
 Print a scalar of a dvar3_array to the screen.
void pad (const dvar4_array &v)
 Print a dvar4_array to the screen.
void pad (const dvar4_array &v, int i)
 Print a 3D slice of a dvar4_array to the screen.
void pad (const dvar4_array &v, int i, int j)
 Print a matrix slice of a dvar4_array to the screen.
void pad (const dvar4_array &v, int i, int j, int k)
 Print a vector slice of a dvar4_array to the screen.
void pad (const d4_array &v)
 Print a d4_array to the screen.
void pad (const d4_array &v, int i)
 Print a 3D slice of a d4_array to the screen.
void pad (const d4_array &v, int i, int j)
 Print a matrix slice of a d4_array to the screen.
void pad (const d4_array &v, int i, int j, int k)
 Print a vector slice of a d4_array to the screen.
void pad (const d3_array &v)
 Print a d3_array to the screen.
void pad (const d3_array &v, int i)
 Print a matrix slice of a d3_array to the screen.
void pad (const d3_array &v, int i, int j)
 Print a vector slice of a d3_array to the screen.
void pad (const d3_array &v, int i, int j, int k)
 Print a scalar of a d3_array to the screen.
void pad (const i3_array &v)
 Print a i3_array to the screen.
void pad (const i3_array &v, int i)
 Print a matrix slice of a i3_array to the screen.
void pad (const i3_array &v, int i, int j)
 Print a vector slice of a i3_array to the screen.
void pad (const i3_array &v, int i, int j, int k)
 Print a scalar of a i3_array to the screen.
void pad (const i4_array &v)
 Print a i4_array to the screen.
void pad (const i4_array &v, int i)
 Print a 3D slice of a i4_array to the screen.
void pad (const i4_array &v, int i, int j)
 Print a matrix slice of a i4_array to the screen.
void pad (const i4_array &v, int i, int j, int k)
 Print a matrix slice of a i4_array to the screen.
void pad (const i4_array &v, int i, int j, int k, int l)
 Print a scalar of a i4_array to the screen.
void pad (const dvar_vector &v)
 Print a dvar_vector to the screen.
void pad (const dvar_vector &v, int i)
 Print an element of a dvar_vector to the screen.
void pad (const prevariable &v)
 Print a prevariable to the screen.
void pad (const dvector &v)
 Print a dvector to the screen.
void pad (const ivector &v)
 Print an ivector to the screen.
void pad (const dvar_matrix &v)
 Print a dvar_matrix to the screen.
void pad (const dvar_matrix &v, int i)
 Print a vector slice of a dvar_matrix to the screen.
void pad (const dvar_matrix &v, int i, int j)
 Print a scalar of a dvar_matrix to the screen.
void pad (const dmatrix &v)
 Print a dmatrix to the screen.
void pad (const dfsdmat &v)
 Print a dfsdmat (a matrix) to the screen.
void pad (const imatrix &v)
 Print a imatrix to the screen.
void pad (const imatrix &v, int i)
 Print a vector slice of an imatrix to the screen.
void pad (const imatrix &v, int i, int j)
 Print a scalar of an imatrix to the screen.
void padp (const dmatrix &v, int i)
 Print a vector slice of a dmatrix to the screen, with 12 significant figures.
void padp (const dvar_matrix &v, int i)
 Print a vector slice of a dvar_matrix to the screen, with 12 significant figures.
void pads (const dvar_vector &v, int i)
 Print an element of a dvar_vector to the screen in scientific notation.
void pads (const dvar_vector &v)
 Print a dvar_vector to the screen in scientific notation, with 5 significant figures.
void padsum (const dvar_vector &v)
 Print the sum of a dvar_vector to the screen.
void padsum (const dvector &v)
 Print the sum of a dvector to the screen.
void padsum (const ivector &v)
 Print the sum of an ivector to the screen.
void padsum (const dvar_matrix &v)
 Print the sum of a dvar_matrix to the screen.
void padsum (const dmatrix &v)
 Print the sum of a dmatrix to the screen.
void padsum (const imatrix &v)
 Print the sum of an imatrix to the screen.

Detailed Description

Source code for functions for printing ADMB objects during GDB sessions.

This functioniality was added to allow easy viewing of ADMB variables of all types during a GDB debugging session, but the functions can be used in code. To use the functions in a GDB session, ADMB must have been built from source in debug mode, typically using the command 'make debug'. Also, the model TPL must have been compiled using the debug flag, typically using the command 'admb -g '.

Author:
Chris Grandin, Dave Fournier
Date:
6/18/2013

Definition in file gdbprintlib.cpp.


Define Documentation

#define _GDBPRINT_CPP_

Definition at line 19 of file gdbprintlib.cpp.


Function Documentation

void pad ( const dvar3_array v)

Print a dvar3_array to the screen.

Parameters:
vThe dvar3_array to print
Returns:
Nothing

Definition at line 60 of file gdbprintlib.cpp.

void pad ( const dvar3_array v,
int  i 
)

Print a matrix slice of a dvar3_array to the screen.

Parameters:
vThe dvar3_array to print
i1-based index of the matrix to print
Returns:
Nothing

Definition at line 71 of file gdbprintlib.cpp.

void pad ( const dvar3_array v,
int  i,
int  j 
)

Print a vector slice of a dvar3_array to the screen.

Parameters:
vThe dvar3_array to print
i1-based index of the matrix to slice from
j1-based index of the row of the matrix to print
Returns:
Nothing

Definition at line 83 of file gdbprintlib.cpp.

void pad ( const dvar3_array v,
int  i,
int  j,
int  k 
)

Print a scalar of a dvar3_array to the screen.

Parameters:
vThe dvar3_array to print
i1-based index of the matrix to slice from
j1-based index of the row of the matrix to print
k1-based index of the element of the vector to print
Returns:
Nothing

Definition at line 96 of file gdbprintlib.cpp.

void pad ( const dvar4_array v)

Print a dvar4_array to the screen.

Parameters:
vThe dvar4_array to print
Returns:
Nothing

Definition at line 106 of file gdbprintlib.cpp.

void pad ( const dvar4_array v,
int  i 
)

Print a 3D slice of a dvar4_array to the screen.

Parameters:
vThe dvar4_array to print
i1-based index of the 3D object to print
Returns:
Nothing

Definition at line 117 of file gdbprintlib.cpp.

void pad ( const dvar4_array v,
int  i,
int  j 
)

Print a matrix slice of a dvar4_array to the screen.

Parameters:
vThe dvar4_array to print
i1-based index of the 3D object to print
j1-based index of the matrix to print
Returns:
Nothing

Definition at line 129 of file gdbprintlib.cpp.

void pad ( const dvar4_array v,
int  i,
int  j,
int  k 
)

Print a vector slice of a dvar4_array to the screen.

Parameters:
vThe dvar4_array to print
i1-based index of the 3D object to print
j1-based index of the matrix to print
k1-based index of the vector to print
Returns:
Nothing

Definition at line 142 of file gdbprintlib.cpp.

void pad ( const d4_array v)

Print a d4_array to the screen.

Parameters:
vThe d4_array to print
Returns:
Nothing

Definition at line 152 of file gdbprintlib.cpp.

void pad ( const d4_array v,
int  i 
)

Print a 3D slice of a d4_array to the screen.

Parameters:
vThe d4_array to print
i1-based index of the 3D object to print
Returns:
Nothing

Definition at line 162 of file gdbprintlib.cpp.

void pad ( const d4_array v,
int  i,
int  j 
)

Print a matrix slice of a d4_array to the screen.

Parameters:
vThe d4_array to print
i1-based index of the 3D object to print
j1-based index of the matrix to print
Returns:
Nothing

Definition at line 174 of file gdbprintlib.cpp.

void pad ( const d4_array v,
int  i,
int  j,
int  k 
)

Print a vector slice of a d4_array to the screen.

Parameters:
vThe d4_array to print
i1-based index of the 3D object to print
j1-based index of the matrix to print
k1-based index of the vector to print
Returns:
Nothing

Definition at line 187 of file gdbprintlib.cpp.

void pad ( const d3_array v)

Print a d3_array to the screen.

Parameters:
vThe d3_array to print
Returns:
Nothing

Definition at line 197 of file gdbprintlib.cpp.

void pad ( const d3_array v,
int  i 
)

Print a matrix slice of a d3_array to the screen.

Parameters:
vThe d3_array to print
i1-based index of the matrix to print
Returns:
Nothing

Definition at line 208 of file gdbprintlib.cpp.

void pad ( const d3_array v,
int  i,
int  j 
)

Print a vector slice of a d3_array to the screen.

Parameters:
vThe d3_array to print
i1-based index of the matrix to print
j1-based index of the vector to print
Returns:
Nothing

Definition at line 220 of file gdbprintlib.cpp.

void pad ( const d3_array v,
int  i,
int  j,
int  k 
)

Print a scalar of a d3_array to the screen.

Parameters:
vThe d3_array to print
i1-based index of the matrix to print
j1-based index of the vector to print
k1-based index of the element to print
Returns:
Nothing

Definition at line 233 of file gdbprintlib.cpp.

void pad ( const i3_array v)

Print a i3_array to the screen.

Parameters:
vThe i3_array to print
Returns:
Nothing

Definition at line 242 of file gdbprintlib.cpp.

void pad ( const i3_array v,
int  i 
)

Print a matrix slice of a i3_array to the screen.

Parameters:
vThe i3_array to print
i1-based index of the matrix to print
Returns:
Nothing

Definition at line 253 of file gdbprintlib.cpp.

void pad ( const i3_array v,
int  i,
int  j 
)

Print a vector slice of a i3_array to the screen.

Parameters:
vThe i3_array to print
i1-based index of the matrix to print
j1-based index of the vector to print
Returns:
Nothing

Definition at line 265 of file gdbprintlib.cpp.

void pad ( const i3_array v,
int  i,
int  j,
int  k 
)

Print a scalar of a i3_array to the screen.

Parameters:
vThe i3_array to print
i1-based index of the matrix to print
j1-based index of the vector to print
k1-based index of the element to print
Returns:
Nothing

Definition at line 278 of file gdbprintlib.cpp.

void pad ( const i4_array v)

Print a i4_array to the screen.

Parameters:
vThe i4_array to print
Returns:
Nothing

Definition at line 288 of file gdbprintlib.cpp.

void pad ( const i4_array v,
int  i 
)

Print a 3D slice of a i4_array to the screen.

Parameters:
vThe i4_array to print
i1-based index of the 3D object to print
Returns:
Nothing

Definition at line 299 of file gdbprintlib.cpp.

void pad ( const i4_array v,
int  i,
int  j 
)

Print a matrix slice of a i4_array to the screen.

Parameters:
vThe i4_array to print
i1-based index of the 3D object to print
j1-based index of the matrix to print
Returns:
Nothing

Definition at line 311 of file gdbprintlib.cpp.

void pad ( const i4_array v,
int  i,
int  j,
int  k 
)

Print a matrix slice of a i4_array to the screen.

Parameters:
vThe i4_array to print
i1-based index of the 3D object to print
j1-based index of the matrix to print
Returns:
Nothing

Definition at line 323 of file gdbprintlib.cpp.

void pad ( const i4_array v,
int  i,
int  j,
int  k,
int  l 
)

Print a scalar of a i4_array to the screen.

Parameters:
vThe i4_array to print
i1-based index of the 3D object to print
j1-based index of the matrix to print
k1-based index of the vector to print
l1-based index of the element to print
Returns:
Nothing

Definition at line 337 of file gdbprintlib.cpp.

void pad ( const dvar_vector v)

Print a dvar_vector to the screen.

Parameters:
vThe dvar_vector
Returns:
Nothing

Definition at line 347 of file gdbprintlib.cpp.

void pad ( const dvar_vector v,
int  i 
)

Print an element of a dvar_vector to the screen.

Parameters:
vThe dvar_vector
i1-based index of the element to be printed
Returns:
Nothing

Definition at line 358 of file gdbprintlib.cpp.

void pad ( const prevariable v)

Print a prevariable to the screen.

Parameters:
vThe prevariable to print
Returns:
Nothing

Definition at line 367 of file gdbprintlib.cpp.

void pad ( const dvector v)

Print a dvector to the screen.

Parameters:
vThe dvector to print
Returns:
Nothing

Definition at line 377 of file gdbprintlib.cpp.

void pad ( const ivector v)

Print an ivector to the screen.

Parameters:
vThe ivector to print
Returns:
Nothing

Definition at line 387 of file gdbprintlib.cpp.

void pad ( const dvar_matrix v)

Print a dvar_matrix to the screen.

Parameters:
vThe dvar_matrix to print
Returns:
Nothing

Definition at line 397 of file gdbprintlib.cpp.

void pad ( const dvar_matrix v,
int  i 
)

Print a vector slice of a dvar_matrix to the screen.

Parameters:
vThe dvar_matrix to print
i1-based index of the vector to be printed
Returns:
Nothing

Definition at line 408 of file gdbprintlib.cpp.

void pad ( const dvar_matrix v,
int  i,
int  j 
)

Print a scalar of a dvar_matrix to the screen.

Parameters:
vThe dvar_matrix to print
i1-based index of the vector to be printed
j1-based index of the element to be printed
Returns:
Nothing

Definition at line 420 of file gdbprintlib.cpp.

void pad ( const dmatrix v)

Print a dmatrix to the screen.

Parameters:
vThe dmatrix to print
Returns:
Nothing

Definition at line 430 of file gdbprintlib.cpp.

void pad ( const dfsdmat v)

Print a dfsdmat (a matrix) to the screen.

Parameters:
vThe dfsdmat to print
Returns:
Nothing

Definition at line 440 of file gdbprintlib.cpp.

void pad ( const imatrix v)

Print a imatrix to the screen.

Parameters:
vThe imatrix to print
Returns:
Nothing

Definition at line 451 of file gdbprintlib.cpp.

void pad ( const imatrix v,
int  i 
)

Print a vector slice of an imatrix to the screen.

Parameters:
vThe imatrix to print
i1-based index of the vector to be printed
Returns:
Nothing

Definition at line 462 of file gdbprintlib.cpp.

void pad ( const imatrix v,
int  i,
int  j 
)

Print a scalar of an imatrix to the screen.

Parameters:
vThe imatrix to print
i1-based index of the vector to be printed
j1-based index of the element to be printed
Returns:
Nothing

Definition at line 474 of file gdbprintlib.cpp.

void padp ( const dmatrix v,
int  i 
)

Print a vector slice of a dmatrix to the screen, with 12 significant figures.

Parameters:
vThe dmatrix to print
i1-based index of the vector to be printed
Returns:
Nothing

Definition at line 506 of file gdbprintlib.cpp.

void padp ( const dvar_matrix v,
int  i 
)

Print a vector slice of a dvar_matrix to the screen, with 12 significant figures.

Parameters:
vThe dvar_matrix to print
i1-based index of the vector to be printed
Returns:
Nothing

Definition at line 517 of file gdbprintlib.cpp.

void pads ( const dvar_vector v,
int  i 
)

Print an element of a dvar_vector to the screen in scientific notation.

Parameters:
vThe dvar_vector
i1-based index of the element to be printed
Returns:
Nothing

Definition at line 485 of file gdbprintlib.cpp.

void pads ( const dvar_vector v)

Print a dvar_vector to the screen in scientific notation, with 5 significant figures.

Parameters:
vThe dvar_vector
Returns:
Nothing

Definition at line 495 of file gdbprintlib.cpp.

void padsum ( const dvar_vector v)

Print the sum of a dvar_vector to the screen.

Parameters:
vThe dvar_vector
Returns:
Nothing

Definition at line 527 of file gdbprintlib.cpp.

void padsum ( const dvector v)

Print the sum of a dvector to the screen.

Parameters:
vThe dvector
Returns:
Nothing

Definition at line 537 of file gdbprintlib.cpp.

void padsum ( const ivector v)

Print the sum of an ivector to the screen.

Parameters:
vThe ivector
Returns:
Nothing

Definition at line 547 of file gdbprintlib.cpp.

void padsum ( const dvar_matrix v)

Print the sum of a dvar_matrix to the screen.

Parameters:
vThe dvar_matrix
Returns:
Nothing

Definition at line 557 of file gdbprintlib.cpp.

void padsum ( const dmatrix v)

Print the sum of a dmatrix to the screen.

Parameters:
vThe dmatrix
Returns:
Nothing

Definition at line 567 of file gdbprintlib.cpp.

void padsum ( const imatrix v)

Print the sum of an imatrix to the screen.

Parameters:
vThe imatrix
Returns:
Nothing

Definition at line 577 of file gdbprintlib.cpp.