ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
dmat17.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include "fvar.hpp"
00012 
00017 dmatrix identity_matrix(int min,int max)
00018 {
00019   dmatrix tmp(min,max,min,max);
00020   #ifndef SAFE_INITIALIZE
00021   tmp.initialize();
00022   #endif
00023 
00024   for (int i=min; i<=max; i++)
00025   {
00026     tmp.elem(i,i)=1;
00027   }
00028   return(tmp);
00029 }