Skip to content

Commit 4b434b0

Browse files
committed
fix headers
1 parent 26b5a78 commit 4b434b0

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

stan/math/prim/fun/square.hpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#ifndef STAN_MATH_PRIM_FUN_SQUARE_HPP
22
#define STAN_MATH_PRIM_FUN_SQUARE_HPP
33

4-
#include <stan/math/prim/meta.hpp>
54
#include <stan/math/prim/fun/Eigen.hpp>
6-
#include <stan/math/prim/fun/square.hpp>
5+
#include <stan/math/prim/meta.hpp>
76
#include <stan/math/prim/functor/apply_scalar_unary.hpp>
87
#include <stan/math/prim/functor/apply_vector_unary.hpp>
98
#include <cmath>
@@ -49,7 +48,7 @@ struct square_fun {
4948
*/
5049
template <
5150
typename Container,
52-
require_not_container_st<std::is_arithmetic, Container>* = nullptr,
51+
require_not_stan_scalar_t<Container>* = nullptr,
5352
require_not_var_matrix_t<Container>* = nullptr,
5453
require_not_nonscalar_prim_or_rev_kernel_expression_t<Container>* = nullptr>
5554
inline auto square(const Container& x) {

stan/math/rev/fun/divide.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <stan/math/prim/meta.hpp>
55
#include <stan/math/rev/meta.hpp>
66
#include <stan/math/rev/core.hpp>
7-
#include <stan/math/rev/core/typedefs.hpp>
87
#include <stan/math/rev/fun/to_arena.hpp>
98
#include <stan/math/rev/fun/value_of.hpp>
109

stan/math/rev/fun/square.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace math {
3232
* @param x Variable to square.
3333
* @return Square of variable.
3434
*/
35-
inline var square(const var& x) {
35+
inline var square(var x) {
3636
return make_callback_var(square(x.val()), [x](auto& vi) mutable {
3737
x.adj() += vi.adj() * 2.0 * x.val();
3838
});

stan/math/rev/fun/to_arena.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <stan/math/prim/fun/Eigen.hpp>
55
#include <stan/math/rev/meta.hpp>
6-
#include <stan/math/rev/core/arena_matrix.hpp>
6+
#include <stan/math/rev/core.hpp>
77
#include <vector>
88
#include <cstring>
99

stan/math/rev/functor/apply_scalar_unary.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define STAN_MATH_REV_FUNCTOR_APPLY_SCALAR_UNARY_HPP
33

44
#include <stan/math/prim/functor/apply_scalar_unary.hpp>
5-
#include <stan/math/rev/core/var.hpp>
5+
#include <stan/math/rev/core.hpp>
66

77
namespace stan {
88
namespace math {

stan/math/rev/functor/gradient.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#ifndef STAN_MATH_REV_FUNCTOR_GRADIENT_HPP
22
#define STAN_MATH_REV_FUNCTOR_GRADIENT_HPP
33

4+
#include <stan/math/prim/fun/Eigen.hpp>
45
#include <stan/math/rev/meta.hpp>
56
#include <stan/math/rev/core.hpp>
6-
#include <stan/math/prim/fun/Eigen.hpp>
7+
#include <stan/math/rev/fun.hpp>
78
#include <stdexcept>
89

910
namespace stan {

0 commit comments

Comments
 (0)