Automatic Differentiation
 
Loading...
Searching...
No Matches
map.hpp File Reference
#include <stan/math/prim/fun/Eigen.hpp>
#include <stan/math/prim/fun/eval.hpp>
#include <stan/math/prim/fun/to_ref.hpp>
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/err/check_consistent_sizes.hpp>
#include <stan/math/prim/err/check_matching_dims.hpp>
#include <stan/math/prim/err/check_size_match.hpp>
#include <stan/math/prim/functor/apply.hpp>
#include <cstddef>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  stan
 The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation from C or the boost::math::lgamma implementation.
 
namespace  stan::math
 Matrices and templated mathematical functions.
 

Functions

template<typename F , typename T , typename... Args, require_std_vector_t< T > * = nullptr>
auto stan::math::map (F &&f, T &&x, Args &&... args)
 Return a std::vector whose i-th element is f(x[i], args...).
 
template<typename F , typename Tuple , typename... Args, require_all_tuple_elements_t< is_std_vector, Tuple > * = nullptr>
auto stan::math::mapN (F &&f, Tuple &&xs, Args &&... args)
 Return a std::vector whose i-th element is f(get<0>(xs)[i], get<1>(xs)[i], ..., args...).
 
template<typename F , typename T , typename... Args, require_eigen_matrix_dynamic_t< T > * = nullptr>
auto stan::math::row_map (F &&f, T &&m, Args &&... args)
 Return a matrix whose i-th row is f(m.row(i), args...).
 
template<typename F , typename T , typename... Args, require_eigen_matrix_dynamic_t< T > * = nullptr>
auto stan::math::col_map (F &&f, T &&m, Args &&... args)
 Return a matrix whose j-th column is f(m.col(j), args...).
 
template<typename F , typename Tuple , typename... Args, require_tuple_t< Tuple > * = nullptr>
auto stan::math::row_mapN (F &&f, Tuple &&ms, Args &&... args)
 Return a matrix whose i-th row is f(get<0>(ms).row(i), get<1>(ms).row(i), ..., args...).
 
template<typename F , typename Tuple , typename... Args, require_tuple_t< Tuple > * = nullptr>
auto stan::math::col_mapN (F &&f, Tuple &&ms, Args &&... args)
 Return a matrix whose j-th column is f(get<0>(ms).col(j), get<1>(ms).col(j), ..., args...).