ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
model15i.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  */
7 #include <admodel.h>
8 
9 void named_i4_array::allocate(int hhsl,int hhsu,int hsl,int hsu,
10  int rmin,int rmax,int cmin,int cmax,const char * s)
11 {
12  i4_array::allocate(hhsl,hhsu,hsl,hsu,rmin,rmax,cmin,cmax);
14 }
15 
16 /*
17 void named_i4_array::allocate(int hhsl,int hhsu,int hsl,int hsu,
18  int rmin,int rmax,const char * s)
19 {
20  i4_array::allocate(hhsl,hhsu,hsl,hsu,rmin,rmax);
21  model_name_tag::allocate(s);
22 }
23 
24 void named_i4_array::allocate(int hhsl,int hhsu,int hsl,int hsu, const char* s)
25 {
26  i4_array::allocate(hhsl,hhsu,hsl,hsu);
27  model_name_tag::allocate(s);
28 }
29 */
30 
31 void named_i4_array::allocate(int hhsl,int hhsu,const char* s)
32 {
33  i4_array::allocate(hhsl,hhsu);
35 }
36 
37 void named_i4_array::allocate(const char* s)
38 {
41 }
42 
44  const index_type& hsl, const index_type& hsu, const index_type& rmin,
45  const index_type& rmax, const index_type& cmin, const index_type& cmax,
46  const char *s)
47 {
48  i4_array::allocate(hhsl,hhsu,hsl,hsu,rmin,rmax,cmin,cmax);
50 }
51 
52 /*
53 void named_i4_array::allocate(ad_integer hhsl,ad_integer hhsu,
54  const index_type& hsl, const index_type& hsu,const char* s)
55 {
56  i4_array::allocate(hhsl,hhsu,hsl,hsu);
57  model_name_tag::allocate(s);
58 }
59 */
60 
61 void named_i4_array::allocate(ad_integer hhsl,ad_integer hhsu,const char* s)
62 {
63  i4_array::allocate(hhsl,hhsu);
65 }
66 
67 /*
68 void named_i4_array::allocate(ad_integer hhsl,ad_integer hhsu,
69  const index_type& hsl, const index_type& hsu, const index_type& rmin,
70  const index_type& rmax, const char *s)
71 {
72  i4_array::allocate(hhsl,hhsu,hsl,hsu,rmin,rmax);
73  model_name_tag::allocate(s);
74 }
75 */
76 
78 {
79  const int min = this->i4_array::indexmin();
80  const int max = this->i4_array::indexmax();
81  for (int i = min; i <= max; i++)
82  {
83  this->i4_array::operator()(i) = m(i);
84  }
85  return *this;
86 }
Uses polymorphism to get index information from various data types to be used in constructing and all...
Definition: fvar.hpp:7731
int indexmin() const
Definition: fvar.hpp:5893
named_i4_array & operator=(const i4_array &m)
Definition: model15i.cpp:77
i3_array & operator()(int i)
Definition: fvar.hpp:5979
Description not yet available.
Definition: fvar.hpp:5769
void allocate(const char *s)
Definition: model.cpp:112
int indexmax() const
Definition: fvar.hpp:5897
#define min(a, b)
Definition: cbivnorm.cpp:188
Description not yet available.
void allocate(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: i4arr.cpp:9
Stores integer.
Definition: fvar.hpp:7654
#define max(a, b)
Definition: cbivnorm.cpp:189