ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
d3arr2b.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 d3_array operator/(const d3_array& m, const double d)
00018 {
00019   d3_array tmp;
00020   tmp.allocate(m);
00021   for (int i=tmp.slicemin();i<=tmp.slicemax();i++)
00022   {
00023     tmp(i)=m(i)/d;
00024   }
00025   return tmp;
00026 }
00031 void d3_array::operator/=(const double d)
00032 {
00033   for (int i=slicemin();i<=slicemax();i++)
00034   {
00035     (*this)(i) /= d;
00036   }
00037 }