Stan  2.14.0
probability, sampling & optimization
total_dims_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_FUN_TOTAL_DIMS_DEF_HPP
2 #define STAN_LANG_AST_FUN_TOTAL_DIMS_DEF_HPP
3 
4 #include <stan/lang/ast.hpp>
5 #include <vector>
6 
7 namespace stan {
8  namespace lang {
9 
10  size_t total_dims(const std::vector<std::vector<expression> >& dimss) {
11  size_t total = 0U;
12  for (size_t i = 0; i < dimss.size(); ++i)
13  total += dimss[i].size();
14  return total;
15  }
16 
17  }
18 }
19 #endif
Probability, optimization and sampling library.
std::size_t total_dims(const std::vector< std::vector< expression > > &dimss)
Return the total number of dimensions when the specified vectors of expressions are concatenated...

     [ Stan Home Page ] © 2011–2016, Stan Development Team.