Loading [MathJax]/extensions/TeX/AMSsymbols.js
Stan Math Library
5.0.0
Automatic Differentiation
▼
Stan Math Library
Overview
▼
Contributor Guides
Developer Guide
Adding New Functions
Adding New Distributions
Common Pitfalls
Using requires for general overloads
Reverse Mode Types
Testing Automatic Differentiation Functions
Testing New Distributions
Add New Functions With Known Gradients
Adding New OpenCL Functions
Windows Development Tips
▼
Internal Docs
►
Probability Distributions
►
OpenCL
►
Compressed Sparse Row matrix format.
►
Type Traits
►
Available requires<> for overloading.
►
Eigen expressions
►
arena_matrix <br>
►
real <br>
►
Parallelism
(External Link) Stan Language Docs
(External Link) Stan Discourse
►
Stan Math Library Docs
►
Class List
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
make_iter_name.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_PRIM_ERR_MAKE_ITER_NAME_HPP
2
#define STAN_MATH_PRIM_ERR_MAKE_ITER_NAME_HPP
3
4
#include <
stan/math/prim/fun/Eigen.hpp
>
5
#include <
stan/math/prim/meta.hpp
>
6
#include <string>
7
8
namespace
stan
{
9
namespace
math {
10
namespace
internal {
11
12
inline
constexpr
auto
construct_idx
() noexcept {
return
""
; }
13
14
template
<
typename
... Idxs>
15
inline
auto
construct_idx
(
size_t
i, Idxs... idxs) {
16
if
(
sizeof
...(Idxs) > 0) {
17
return
std::to_string(i +
stan::error_index::value
) +
", "
18
+
construct_idx
(idxs...);
19
}
else
{
20
return
std::to_string(i +
stan::error_index::value
);
21
}
22
}
23
24
inline
auto
make_iter_name
(
const
char
* name) {
return
std::string(name); }
25
32
template
<
typename
... Idxs>
33
inline
auto
make_iter_name
(
const
char
* name, Idxs... idxs) {
34
return
(std::string(name) +
"["
+
construct_idx
(idxs...) +
"]"
);
35
}
36
}
// namespace internal
37
}
// namespace math
38
}
// namespace stan
39
40
#endif
Eigen.hpp
stan::math::internal::construct_idx
constexpr auto construct_idx() noexcept
Definition
make_iter_name.hpp:12
stan::math::internal::make_iter_name
auto make_iter_name(const char *name)
Definition
make_iter_name.hpp:24
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
meta.hpp
stan::error_index::value
@ value
Definition
error_index.hpp:8
stan
math
prim
err
make_iter_name.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.