ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
dvect3.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 
00018 double norm(const dvector& t1)
00019 {
00020   double tmp = t1 * t1;
00021   if (tmp>0)
00022   {
00023     tmp = pow(tmp,.5);
00024   }
00025   return tmp;
00026 }
00027 
00034 double norm2(const dvector& t1)
00035 {
00036   double tmp = t1 * t1;
00037   return tmp;
00038 }
00039 double sumsq(const dvector& t1) {return(norm2(t1));}