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
lvec2.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
13
#ifdef __TURBOC__
14
#pragma hdrstop
15
#include <iostream.h>
16
#endif
17
18
#ifdef __ZTC__
19
#include <iostream.hpp>
20
#endif
21
22
#include <stdlib.h>
23
24
#ifndef OPT_LIB
25
30
const
AD_LONG_INT
&
lvector::operator[]
(
int
i)
const
31
{
32
if
(i>
indexmax
())
33
{
34
cerr <<
"array bound exceeded -- index too high in lvector::operator[]"
;
35
ad_exit
(1);
36
}
37
38
if
(i<
indexmin
())
39
{
40
cerr <<
"array bound exceeded -- index too low in lvector::operator[]"
;
41
ad_exit
(1);
42
}
43
return
(*(
v
+i));
44
}
45
50
const
AD_LONG_INT
&
lvector::operator()
(
int
i)
const
51
{
52
if
(i>
indexmax
())
53
{
54
cerr <<
"array bound exceeded -- index too high in lvector::operator[]"
;
55
ad_exit
(1);
56
}
57
58
if
(i<
indexmin
())
59
{
60
cerr <<
"array bound exceeded -- index too low in lvector::operator[]"
;
61
ad_exit
(1);
62
}
63
return
(*(
v
+i));
64
}
65
#endif
lvector::v
AD_LONG_INT * v
Definition:
fvar.hpp:658
lvector::indexmin
int indexmin() const
Definition:
fvar.hpp:676
ad_exit
exitptr ad_exit
Definition:
gradstrc.cpp:53
lvector::indexmax
int indexmax() const
Definition:
fvar.hpp:681
fvar.hpp
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
lvector::operator[]
AD_LONG_INT & operator[](int i)
Definition:
fvar.hpp:742
lvector::operator()
AD_LONG_INT & operator()(int i)
Definition:
fvar.hpp:746
AD_LONG_INT
#define AD_LONG_INT
Definition:
fvar.hpp:81
Generated on Wed Sep 7 2022 00:01:29 for ADMB Documentation by
1.8.5