ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dmat24.cpp
Go to the documentation of this file.
1 
5 #include "fvar.hpp"
6 
12 double mean(const dmatrix& m)
13 {
14  unsigned int size = size_count(m);
15  if (size == 0)
16  {
17  cerr << "Error: Unable to compute mean of empty dmatrix.\n";
18  ad_exit(1);
19  }
20  return sum(m) / size;
21 }
double sum(const d3_array &darray)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: d3arr.cpp:21
exitptr ad_exit
Definition: gradstrc.cpp:53
double mean(const dvector &vec)
Returns computed mean of vec.
Definition: cranfill.cpp:43
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
Definition: fvar.hpp:2819
unsigned int size_count(const dvector &x)
Returns total size of elements in vector x.
Definition: dsize.cpp:17