ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fvar_m33.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 
18 {
19  int nrl = dm.rowmin();
20  int nrh = dm.rowmax();
21 
22  index_min = nrl;
23  index_max = nrh;
24 
25  if ((m = new dvector[rowsize()]) == 0)
26  {
27  cerr << " Error allocating memory in dmatrix contructor\n";
28  ad_exit(21);
29  }
30  if ((shape = new mat_shapex(m)) == 0)
31  {
32  cerr << " Error allocating memory in dmatrix contructor\n";
33  ad_exit(21);
34  }
35 
36  m -= nrl;
37  dvector* pmi = m + nrl;
38  const dvar_vector* pdmi = &dm(nrl);
39  for (int i = nrl; i <= nrh; ++i)
40  {
41  pmi->allocate(*pdmi);
42 
43  ++pmi;
44  ++pdmi;
45  }
46 }
int index_min
Definition: fvar.hpp:2822
int rowmax(void) const
Definition: fvar.hpp:2564
Description not yet available.
Definition: fvar.hpp:2030
void allocate(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: dmat0.cpp:8
Vector of double precision numbers.
Definition: dvector.h:50
void allocate(int ncl, int ncu)
Allocate memory for a dvector.
Definition: dvector.cpp:409
exitptr ad_exit
Definition: gradstrc.cpp:53
int index_max
Definition: fvar.hpp:2823
mat_shapex * shape
Definition: fvar.hpp:2825
ADMB variable vector.
Definition: fvar.hpp:2172
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
dvector * m
Definition: fvar.hpp:2824
int rowmin(void) const
Definition: fvar.hpp:2560
Class definition of matrix with derivitive information .
Definition: fvar.hpp:2480
unsigned int rowsize() const
Definition: fvar.hpp:2934