Skip to content

Commit

Permalink
update header includes
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBronder committed Nov 14, 2024
1 parent 9a6a4ec commit 2bc815c
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions stan/math/fwd/fun/hypergeometric_1F0.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#include <stan/math/fwd/core.hpp>
#include <stan/math/fwd/meta.hpp>
#include <stan/math/rev/fun/log1m.hpp>
#include <stan/math/rev/fun/inv.hpp>
#include <stan/math/rev/fun/value_of.hpp>
#include <stan/math/fwd/fun/log1m.hpp>
#include <stan/math/fwd/fun/inv.hpp>
#include <stan/math/fwd/fun/value_of.hpp>
#include <stan/math/prim/fun/hypergeometric_1F0.hpp>

namespace stan {
Expand Down
3 changes: 2 additions & 1 deletion stan/math/fwd/fun/inv_sqrt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <stan/math/fwd/meta.hpp>
#include <stan/math/fwd/core.hpp>
#include <stan/math/fwd/fun/sqrt.hpp>
#include <stan/math/prim/fun/inv_sqrt.hpp>
#include <cmath>

Expand All @@ -12,7 +13,7 @@ namespace math {
template <typename T>
inline fvar<T> inv_sqrt(const fvar<T>& x) {
T sqrt_x(sqrt(x.val_));
return fvar<T>(1 / sqrt_x, -0.5 * x.d_ / (x.val_ * sqrt_x));
return fvar<T>(1.0 / sqrt_x, -0.5 * x.d_ / (x.val_ * sqrt_x));
}
} // namespace math
} // namespace stan
Expand Down
1 change: 1 addition & 0 deletions stan/math/fwd/fun/log_mix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <stan/math/fwd/meta.hpp>
#include <stan/math/fwd/core.hpp>
#include <stan/math/fwd/fun/exp.hpp>
#include <stan/math/fwd/fun/value_of.hpp>
#include <stan/math/prim/fun/log_mix.hpp>
#include <cmath>
Expand Down
9 changes: 7 additions & 2 deletions stan/math/fwd/fun/tcrossprod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <stan/math/fwd/fun/multiply.hpp>
#include <stan/math/prim/fun/to_ref.hpp>
#include <stan/math/prim/fun/transpose.hpp>
#include <stan/math/prim/fun/multiply.hpp>

namespace stan {
namespace math {
Expand All @@ -19,7 +18,13 @@ tcrossprod(const EigMat& m) {
return {};
}
const auto& m_ref = to_ref(m);
return m_ref * m_ref.transpose();
auto ret = multiply(m_ref, m_ref.transpose());
if constexpr (is_stan_scalar<decltype(ret)>::value) {
return Eigen::Matrix<value_type_t<EigMat>, EigMat::RowsAtCompileTime,
EigMat::RowsAtCompileTime>{{ret}};
} else {
return ret;
}
}

} // namespace math
Expand Down
2 changes: 0 additions & 2 deletions stan/math/rev/fun/asinh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#include <stan/math/prim/core.hpp>
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/fun/asinh.hpp>
#include <stan/math/prim/fun/isinf.hpp>
#include <stan/math/prim/fun/is_inf.hpp>
#include <cmath>
#include <complex>

Expand Down
2 changes: 0 additions & 2 deletions stan/math/rev/fun/atan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include <stan/math/rev/fun/sqrt.hpp>
#include <stan/math/rev/fun/is_inf.hpp>
#include <stan/math/rev/fun/is_nan.hpp>
#include <stan/math/prim/fun/isinf.hpp>
#include <stan/math/prim/fun/isnan.hpp>
#include <stan/math/prim/fun/atan.hpp>
#include <cmath>
#include <complex>
Expand Down
2 changes: 1 addition & 1 deletion stan/math/rev/fun/columns_dot_product.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef STAN_MATH_REV_FUN_COLUMNS_DOT_PRODUCT_HPP
#define STAN_MATH_REV_FUN_COLUMNS_DOT_PRODUCT_HPP

#include <stan/math/prim/fun/Eigen.hpp>
#include <stan/math/rev/meta.hpp>
#include <stan/math/rev/core.hpp>
#include <stan/math/rev/core/typedefs.hpp>
#include <stan/math/rev/fun/dot_product.hpp>
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/err.hpp>
#include <stan/math/prim/fun/Eigen.hpp>

#include <type_traits>

Expand Down
2 changes: 0 additions & 2 deletions stan/math/rev/fun/cos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#include <stan/math/rev/fun/abs.hpp>
#include <stan/math/rev/fun/cosh.hpp>
#include <stan/math/rev/fun/sinh.hpp>
#include <stan/math/prim/fun/isinf.hpp>
#include <stan/math/prim/fun/isfinite.hpp>
#include <stan/math/prim/fun/cos.hpp>
#include <cmath>
#include <complex>
Expand Down
2 changes: 0 additions & 2 deletions stan/math/rev/fun/exp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#include <stan/math/rev/fun/is_inf.hpp>
#include <stan/math/rev/fun/is_nan.hpp>
#include <stan/math/rev/fun/sin.hpp>
#include <stan/math/prim/fun/isinf.hpp>
#include <stan/math/prim/fun/isfinite.hpp>
#include <stan/math/prim/fun/exp.hpp>
#include <cmath>
#include <complex>
Expand Down
2 changes: 1 addition & 1 deletion stan/math/rev/fun/hypergeometric_pFq.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef STAN_MATH_REV_FUN_HYPERGEOMETRIC_PFQ_HPP
#define STAN_MATH_REV_FUN_HYPERGEOMETRIC_PFQ_HPP

#include <stan/math/prim/meta.hpp>
#include <stan/math/rev/core.hpp>
#include <stan/math/rev/meta.hpp>
#include <stan/math/rev/fun/hypergeometric_pFq.hpp>
#include <stan/math/prim/fun/grad_pFq.hpp>

Expand Down

0 comments on commit 2bc815c

Please sign in to comment.