Stan  1.3
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
sub.hpp
Go to the documentation of this file.
1 #ifndef __STAN__MATH__FUNCTIONS__SUB_HPP__
2 #define __STAN__MATH__FUNCTIONS__SUB_HPP__
3 
4 #include <vector>
5 
6 namespace stan {
7  namespace math {
8 
9  inline void sub(std::vector<double>& x, std::vector<double>& y,
10  std::vector<double>& result) {
11  result.resize(x.size());
12  for (size_t i = 0; i < x.size(); ++i)
13  result[i] = x[i] - y[i];
14  }
15 
16  }
17 }
18 
19 #endif

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