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
df1b2-separable
df1b2ptr.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 <
df1b2fun.h
>
12
13
typedef
df1b2_header
*
ad_df1b2_header_ptr
;
14
typedef
double
*
ad_double_ptr
;
15
23
df1b2_header_ptr_vector::df1b2_header_ptr_vector
(
int
mmin,
int
mmax)
24
{
25
index_min
= mmin;
26
index_max
= mmax;
27
v
=
new
ad_df1b2_header_ptr
[
28
static_cast<
unsigned
int
>
(mmax < mmin ? 0 : mmax - mmin + 1)];
29
if
(
v
== 0)
30
{
31
cerr <<
"error allocating memory for df1b2_header_ptr_vector\n"
;
32
ad_exit
(1);
33
}
34
v
-=
indexmin
();
35
}
39
df1b2_header_ptr_vector::~df1b2_header_ptr_vector
()
40
{
41
if
(
v
!=0)
42
{
43
v
+=
indexmin
();
44
delete
[]
v
;
45
v
= 0;
46
index_min
= 0;
47
index_max
= -1;
48
}
49
}
57
double_ptr_vector::double_ptr_vector
(
int
mmin,
int
mmax)
58
{
59
index_min
= mmin;
60
index_max
= mmax;
61
v
=
new
ad_double_ptr
[
62
static_cast<
unsigned
int
>
(mmax < mmin ? 0 : mmax - mmin + 1)];
63
if
(
v
== 0)
64
{
65
cerr <<
"error allocating memory for double_ptr_vector\n."
;
66
ad_exit
(1);
67
}
68
v
-=
indexmin
();
69
}
73
double_ptr_vector::~double_ptr_vector
()
74
{
75
if
(
v
!=0)
76
{
77
v
+=
indexmin
();
78
delete
[]
v
;
79
v
= 0;
80
index_min
= 0;
81
index_max
= -1;
82
}
83
}
double_ptr_vector::indexmin
int indexmin(void)
Definition:
df1b2fun.h:1784
double_ptr_vector::double_ptr_vector
double_ptr_vector(int mmin, int mmax)
Constructor vector of ad_double_ptr with dimension [mmin to mmax].
Definition:
df1b2ptr.cpp:57
df1b2_header_ptr_vector::indexmin
int indexmin(void)
Definition:
df1b2fun.h:1766
df1b2_header_ptr_vector::index_max
int index_max
Definition:
df1b2fun.h:1759
df1b2_header_ptr_vector::~df1b2_header_ptr_vector
~df1b2_header_ptr_vector()
Destructor.
Definition:
df1b2ptr.cpp:39
ad_exit
exitptr ad_exit
Definition:
gradstrc.cpp:53
df1b2_header_ptr_vector::index_min
int index_min
Definition:
df1b2fun.h:1758
double_ptr_vector::index_max
int index_max
Definition:
df1b2fun.h:1777
df1b2_header_ptr_vector::v
df1b2_header ** v
Definition:
df1b2fun.h:1760
double_ptr_vector::v
double ** v
Definition:
df1b2fun.h:1778
df1b2_header_ptr_vector::df1b2_header_ptr_vector
df1b2_header_ptr_vector(int mmin, int mmax)
Constructor vector of ad_df1b2_header_ptr with dimension [mmin to mmax].
Definition:
df1b2ptr.cpp:23
df1b2_header
Base class for df1b2variable.
Definition:
df1b2fun.h:191
df1b2fun.h
Description not yet available.
double_ptr_vector::index_min
int index_min
Definition:
df1b2fun.h:1776
double_ptr_vector::~double_ptr_vector
~double_ptr_vector()
Destructor.
Definition:
df1b2ptr.cpp:73
ad_df1b2_header_ptr
df1b2_header * ad_df1b2_header_ptr
Definition:
df1b2ptr.cpp:13
ad_double_ptr
double * ad_double_ptr
Definition:
df1b2ptr.cpp:14
Generated on Wed Sep 7 2022 00:01:27 for ADMB Documentation by
1.8.5