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
imat1.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
#include <cassert>
13
19
bool
imatrix::is_valid_row
(
const
int
i)
const
20
{
21
const
bool
valid =
index_min
<= i && i <=
index_max
;
22
if
(!valid)
23
{
24
cerr <<
"Error: Used invalid i = "
<< i <<
" for imatrix rows bounded by ["
25
<<
index_min
<<
", "
<<
index_max
<<
"].\n"
;
26
}
27
return
valid;
28
}
29
#if !defined(OPT_LIB)
30
36
ivector
&
imatrix::operator()
(
int
i)
37
{
38
if
(!
is_valid_row
(i))
39
{
40
ad_exit
(1);
41
}
42
43
return
elem
(i);
44
}
51
const
ivector
&
imatrix::operator()
(
int
i)
const
52
{
53
if
(!
is_valid_row
(i))
54
{
55
ad_exit
(1);
56
}
57
58
return
elem
(i);
59
}
60
#endif
imatrix::elem
ivector & elem(int i)
Definition:
imatrix.h:233
imatrix::index_max
int index_max
Definition:
imatrix.h:73
ad_exit
exitptr ad_exit
Definition:
gradstrc.cpp:53
imatrix::operator()
ivector & operator()(int)
Definition:
imatrix.h:205
ivector
Array of integers(int) with indexes from index_min to indexmax.
Definition:
ivector.h:50
fvar.hpp
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
imatrix::index_min
int index_min
Definition:
imatrix.h:72
imatrix::is_valid_row
bool is_valid_row(const int i) const
Check index i is in matrix row bounds [index_min, index_max].
Definition:
imat1.cpp:19
Generated on Wed Sep 7 2022 00:01:29 for ADMB Documentation by
1.8.5