ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
dmat23.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 outer_prod(const dvector& v1, const dvector& v2)
00018 {
00019   dmatrix tmp(v1.indexmin(),v1.indexmax(), v2.indexmin(), v2.indexmax() );
00020 
00021   for (int i=v1.indexmin(); i<=v1.indexmax(); i++)
00022   {
00023     for (int j=v2.indexmin(); j<=v2.indexmax(); j++)
00024     {
00025       tmp.elem(i,j)=v1.elem(i)*v2.elem(j);
00026     }
00027   }
00028   return(tmp);
00029 }