ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
d3arr3.cpp
Go to the documentation of this file.
1 
5 #include "fvar.hpp"
6 
10 double mean(const d3_array& array)
11 {
12  unsigned int size = size_count(array);
13  if (size == 0)
14  {
15  cerr << "Error: Unable to compute mean of empty d3_array.\n";
16  ad_exit(1);
17  }
18  return sum(array) / size;
19 }
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.
unsigned int size_count(const dvector &x)
Returns total size of elements in vector x.
Definition: dsize.cpp:17
Description not yet available.
Definition: fvar.hpp:3727