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
csr_u_to_z.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_PRIM_FUN_CSR_U_TO_Z
2
#define STAN_MATH_PRIM_FUN_CSR_U_TO_Z
3
4
#include <
stan/math/prim/err.hpp
>
5
#include <stdexcept>
6
#include <vector>
7
8
namespace
stan
{
9
namespace
math {
10
25
inline
int
csr_u_to_z
(
const
std::vector<int>& u,
int
i) {
26
check_range
(
"csr_u_to_z"
,
"i"
, u.size(), i + 1,
"index out of range"
);
27
return
u[i + 1] - u[i];
28
}
29
30
}
// namespace math
31
}
// namespace stan
32
33
#endif
stan::math::csr_u_to_z
int csr_u_to_z(const std::vector< int > &u, int i)
Return the z vector computed from the specified u vector at the index for the z vector.
Definition
csr_u_to_z.hpp:25
stan::math::check_range
void check_range(const char *function, const char *name, int max, int index, int nested_level, const char *error_msg)
Check if specified index is within range.
Definition
check_range.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
err.hpp
stan
math
prim
fun
csr_u_to_z.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.