ADMB Documentation  11.1x.2738
 All Classes Files Functions Variables Typedefs Friends Defines
dmat22.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: dmat22.cpp 1942 2014-04-28 22:22:45Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 // file fvar.cpp
00012 // constructors, destructors and misc functions involving class dvariable
00013 
00014 #include "fvar.hpp"
00015 
00016 #ifdef __TURBOC__
00017   #pragma hdrstop
00018   #include <iostream.h>
00019 #endif
00020 
00021 #ifdef __ZTC__
00022   #include <iostream.hpp>
00023 #endif
00024 
00025 
00026 #include <stdio.h>
00027 #ifndef __SUN__
00028 #endif
00029 #include <math.h>
00030 
00035 dmatrix& dmatrix::operator=(const double x)
00036 {
00037   for (int i=rowmin();i<=rowmax();i++)
00038   {
00039     elem(i)=x;
00040   }
00041   return (*this);
00042 }
00043 
00048 dmatrix& dmatrix::operator/=(const double x)
00049 {
00050   for (int i=rowmin();i<=rowmax();i++)
00051   {
00052     elem(i)/=x;
00053   }
00054   return (*this);
00055 }
00056 
00061 dmatrix& dmatrix::operator*=(const double x)
00062 {
00063   for (int i=rowmin();i<=rowmax();i++)
00064   {
00065     elem(i)*=x;
00066   }
00067   return (*this);
00068 }