ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dvect13.cpp
Go to the documentation of this file.
1 
5 #include <fvar.hpp>
6 
11 {
12  int min = v.indexmin();
13  int max = v.indexmax();
14  dmatrix ret(min, max, 1, 1);
15  for (int i = min; i <= max; ++i)
16  {
17  ret.elem(i, 1) = v.elem(i);
18  }
19  return ret;
20 }
25 {
26  int min = v.indexmin();
27  int max = v.indexmax();
28  dmatrix ret(1, 1, min, max);
29  for (int i = min; i <= max; ++i)
30  {
31  ret.elem(1, i) = v.elem(i);
32  }
33  return ret;
34 }
39 {
40  int min = v.indexmin();
41  int max = v.indexmax();
42  dvar_matrix ret(min, max, 1, 1);
43  for (int i = min; i <= max; ++i)
44  {
45  ret.elem(i, 1) = v.elem(i);
46  }
47  return ret;
48 }
53 {
54  int min = v.indexmin();
55  int max = v.indexmax();
56  dvar_matrix ret(1, 1, min, max);
57  for (int i = min; i <= max; ++i)
58  {
59  ret.elem(1, i) = v.elem(i);
60  }
61  return ret;
62 }
dvar_vector & elem(int i)
Definition: fvar.hpp:2507
double & elem(int i)
Definition: dvector.h:152
dmatrix row_vector(const dvector &v)
Returns dvar_matrix with a single row using values from v.
Definition: dvect13.cpp:24
Vector of double precision numbers.
Definition: dvector.h:50
int indexmin() const
Get minimum valid index.
Definition: dvector.h:199
prevariable elem(int i)
Definition: fvar.hpp:2221
ADMB variable vector.
Definition: fvar.hpp:2172
#define min(a, b)
Definition: cbivnorm.cpp:188
int indexmax() const
Get maximum valid index.
Definition: dvector.h:204
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
Definition: fvar.hpp:2819
dmatrix column_vector(const dvector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: dvect13.cpp:10
dvector & elem(int i)
Definition: fvar.hpp:3011
int indexmin() const
Definition: fvar.hpp:2287
Class definition of matrix with derivitive information .
Definition: fvar.hpp:2480
#define max(a, b)
Definition: cbivnorm.cpp:189
int indexmax() const
Definition: fvar.hpp:2292