ADMB Documentation  11.1.2496
 All Classes Files Functions Variables Typedefs Friends Defines
imat3.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: imat3.cpp 1112 2013-07-12 21:41:41Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include "fvar.hpp"
00012 #ifdef __TURBOC__
00013   #pragma hdrstop
00014 #endif
00015 
00020  void imatrix::initialize (void)
00021  {
00022    for (int i=rowmin();i<=rowmax();i++)
00023    {
00024      (*this)(i).initialize();
00025    }
00026  }
00027 
00032  imatrix trans(const imatrix& m1)
00033  {
00034    imatrix tmp(m1.colmin(),m1.colmax(),m1.rowmin(),m1.rowmax());
00035 
00036    for (int i=m1.rowmin(); i<=m1.rowmax(); i++)
00037    {
00038      for (int j=m1.colmin(); j<=m1.colmax(); j++)
00039      {
00040        tmp[j][i]=m1[i][j];
00041      }
00042    }
00043    return (tmp);
00044  }