ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
f1b2vc6.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 
18 {
20  int rmin=M.indexmin();
21  int rmax=M.indexmax();
22  df1b2matrix tmp(rmin,rmax);
23  for (int i=rmin;i<=rmax;i++)
24  {
25  int cmin=M(i).indexmin();
26  int cmax=M(i).indexmax();
27  tmp(i).noallocate(cmin,cmax);
28  for (int j=cmin;j<=cmax;j++)
29  tmp(i,j)=exp(M(i,j));
30  }
31  return tmp;
32 }
33 
39 {
41  int rmin=M.indexmin();
42  int rmax=M.indexmax();
43  int cmin=M(rmin).indexmin();
44  int cmax=M(rmin).indexmax();
45  df1b2vector tmp(cmin,cmax);
46  tmp.initialize();
47  for (int i=rmin;i<=rmax;i++)
48  {
49  for (int j=cmin;j<=cmax;j++)
50  tmp(j)+=M(i,j);
51  }
52  return tmp;
53 }
54 
60 {
62  int rmin=M.indexmin();
63  int rmax=M.indexmax();
64  df1b2vector tmp(rmin,rmax);
65  tmp.initialize();
66  for (int i=rmin;i<=rmax;i++)
67  {
68  int cmin=M(rmin).indexmin();
69  int cmax=M(rmin).indexmax();
70  for (int j=cmin;j<=cmax;j++)
71  tmp(i)+=M(i,j);
72  }
73  return tmp;
74 }
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
Definition: fvar.hpp:140
Description not yet available.
Definition: df1b2fun.h:953
dvector rowsum(const dmatrix &matrix)
Returns dvector where each element contains the sum total of each row in matrix.
Definition: dvect12.cpp:61
double colsum(const dmatrix &m, int col)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: dmat27.cpp:10
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
Definition: d3arr2a.cpp:28
#define M
Definition: rngen.cpp:57
Description not yet available.
Definition: df1b2fun.h:1042
Description not yet available.
void initialize(void)
Description not yet available.
Definition: f1b2vc3.cpp:287