ADMB Documentation
-a65f1c97
Main Page
Function Reference
Classes
Source Code
Related Pages
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
linad99
fvar_m46.cpp
Go to the documentation of this file.
1
/*
2
* $Id$
3
*
4
* Author: David Fournier
5
* Copyright (c) 2008-2012 Regents of the University of California
6
*/
11
#include "
fvar.hpp
"
12
17
dvar_vector
diagonal
(
const
dvar_matrix
& m)
18
{
19
if
(m.
indexmin
() != m.
colmin
() || m.
indexmax
() != m.
colmax
())
20
{
21
cerr <<
"Error matrix not square in function diagonal"
<<
endl
;
22
ad_exit
(21);
23
}
24
int
mmin=m.
indexmin
();
25
int
mmax=m.
indexmax
();
26
dvar_vector
tmp(mmin,mmax);
27
for
(
int
i=mmin;i<=mmax;i++)
28
tmp(i)=m(i,i);
29
return
tmp;
30
}
diagonal
dvector diagonal(const dmatrix &matrix)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition:
dmat31.cpp:12
dvar_matrix::colmin
int colmin(void) const
Definition:
fvar.hpp:2552
ad_exit
exitptr ad_exit
Definition:
gradstrc.cpp:53
dvar_vector
ADMB variable vector.
Definition:
fvar.hpp:2172
endl
prnstream & endl(prnstream &)
fvar.hpp
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
dvar_matrix::indexmax
int indexmax(void) const
Definition:
fvar.hpp:2572
dvar_matrix
Class definition of matrix with derivitive information .
Definition:
fvar.hpp:2480
dvar_matrix::indexmin
int indexmin(void) const
Definition:
fvar.hpp:2568
dvar_matrix::colmax
int colmax(void) const
Definition:
fvar.hpp:2556
Generated on Wed Sep 7 2022 00:01:28 for ADMB Documentation by
1.8.5