ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dmat25.cpp
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Author: David Fournier
5  * Copyright (c) 2008-2012 Regents of the University of California
6  */
11 // file fvar.cpp
12 // constructors, destructors and misc functions involving class dvariable
13 
14 #include "fvar.hpp"
15 
16 #ifdef __TURBOC__
17  #pragma hdrstop
18  #include <iostream.h>
19 #endif
20 
21 #ifdef __ZTC__
22  #include <iostream.hpp>
23 #endif
24 
25 
26 #include <stdio.h>
27 #ifndef __SUN__
28 #endif
29 #include <math.h>
30 
35 dmatrix operator/(const dmatrix& m, const double e)
36 {
37  dmatrix tmp;
38  tmp.allocate(m);
39  for (int i=m.rowmin();i<=m.rowmax();i++)
40  {
41  tmp(i)=m(i)/e;
42  }
43  return tmp;
44 }
45 
50 dmatrix operator/(const double e, const dmatrix& m)
51 {
52  dmatrix tmp;
53  tmp.allocate(m);
54  for (int i=m.rowmin();i<=m.rowmax();i++)
55  {
56  tmp(i)=e/m(i);
57  }
58  return tmp;
59 }
void allocate(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: dmat0.cpp:8
int rowmax() const
Definition: fvar.hpp:2929
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
Definition: fvar.hpp:2819
d3_array operator/(const d3_array &m, const double d)
Author: David Fournier.
Definition: d3arr2b.cpp:14
int rowmin() const
Definition: fvar.hpp:2925