ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
f1b2ma1.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 
17 df1b2vector column(const df1b2matrix& _M,int n)
18 {
20  int mmin=M.indexmin();
21  int mmax=M.indexmax();
22  if (n<M(mmin).indexmin() || n>M(mmin).indexmax())
23  {
24  cerr << "Index out of range in "
25  " df1b2vector column(const df1b2matrix& M,int n) "
26  << endl;
27  ad_exit(1);
28  }
29  df1b2vector tmp(mmin,mmax);
30  for (int i=mmin;i<=mmax;i++)
31  {
32  tmp(i)=M(i,n);
33  }
34  return tmp;
35 }
36 
42  {
44  int rmin=m1.indexmin();
45  int rmax=m1.indexmax();
46  int cmin=m1(rmin).indexmin();
47  int cmax=m1(rmin).indexmax();
48  df1b2matrix tmp(cmin,cmax,rmin,rmax);
49 
50  for (int i=rmin; i<=rmax; i++)
51  {
52  for (int j=cmin; j<=cmax; j++)
53  {
54  tmp(j,i)=m1(i,j);
55  }
56  }
57  return (tmp);
58  }
dmatrix trans(const dmatrix &m1)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: dmat2.cpp:13
#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
exitptr ad_exit
Definition: gradstrc.cpp:53
prnstream & endl(prnstream &)
#define M
Definition: rngen.cpp:57
Description not yet available.
Definition: df1b2fun.h:1042
Description not yet available.
dvector column(const dmatrix &matrix, int j)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: dmat6.cpp:13