Skip to content

Commit

Permalink
adding back in some requires traits
Browse files Browse the repository at this point in the history
  • Loading branch information
syclik committed Dec 3, 2023
1 parent f2fce93 commit bcc7f0e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stan/math/prim/meta/is_complex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ using require_all_not_complex_t

// STAN_ADD_REQUIRE_UNARY_INNER(complex, is_complex,
// require_stan_scalar_complex);
template <typename T>
using require_vt_complex = require_t<is_complex<value_type_t<std::decay_t<T>>>>;

template <typename T>
using require_not_vt_complex
= require_not_t<is_complex<value_type_t<std::decay_t<T>>>>;
Expand Down
4 changes: 4 additions & 0 deletions stan/math/prim/meta/is_eigen_dense_dynamic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ template <typename T>
using require_eigen_dense_dynamic_t
= require_t<is_eigen_dense_dynamic<std::decay_t<T>>>;

template <typename... Types>
using require_all_eigen_dense_dynamic_t
= require_all_t<is_eigen_dense_dynamic<std::decay_t<Types>>...>;

// STAN_ADD_REQUIRE_CONTAINER(eigen_dense_dynamic, is_eigen_dense_dynamic,
// require_eigens_types);
template <template <class...> class TypeCheck, class... Check>
Expand Down
4 changes: 4 additions & 0 deletions stan/math/prim/meta/is_var_dense_dynamic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ struct is_var_dense_dynamic

// STAN_ADD_REQUIRE_UNARY(var_dense_dynamic, is_var_dense_dynamic,
// require_eigens_types);
template <typename T>
using require_var_dense_dynamic_t
= require_t<is_var_dense_dynamic<std::decay_t<T>>>;

// STAN_ADD_REQUIRE_UNARY_INNER(var_dense_dynamic, is_var_dense_dynamic,
// require_eigens_types);
} // namespace stan
Expand Down
4 changes: 4 additions & 0 deletions stan/math/prim/meta/is_var_matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ using require_var_matrix_t = require_t<is_var_matrix<std::decay_t<T>>>;
template <typename T>
using require_not_var_matrix_t = require_not_t<is_var_matrix<std::decay_t<T>>>;

template <typename... Types>
using require_all_var_matrix_t
= require_all_t<is_var_matrix<std::decay_t<Types>>...>;

template <typename... Types>
using require_any_var_matrix_t
= require_any_t<is_var_matrix<std::decay_t<Types>>...>;
Expand Down
3 changes: 3 additions & 0 deletions stan/math/prim/meta/is_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ template <typename T>
struct is_row_vector : internal::is_row_vector_impl<T> {};

// STAN_ADD_REQUIRE_UNARY(row_vector, is_row_vector, require_eigens_types);
template <typename T>
using require_row_vector_t = require_t<is_row_vector<std::decay_t<T>>>;

// STAN_ADD_REQUIRE_CONTAINER(row_vector, is_row_vector, require_eigens_types);
/** \ingroup type_trait
* If the input type T is an eigen matrix with 1 column or 1 row at compile time
Expand Down

0 comments on commit bcc7f0e

Please sign in to comment.