![]() |
Stan
2.14.0
probability, sampling & optimization
|
A stream-based reader for integer, scalar, vector, matrix and array data types, with Jacobian calculations. More...
#include <reader.hpp>
Public Types | |
typedef Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | matrix_t |
typedef Eigen::Matrix< T, Eigen::Dynamic, 1 > | vector_t |
typedef Eigen::Matrix< T, 1, Eigen::Dynamic > | row_vector_t |
typedef Eigen::Map< matrix_t > | map_matrix_t |
typedef Eigen::Map< vector_t > | map_vector_t |
typedef Eigen::Map< row_vector_t > | map_row_vector_t |
Public Member Functions | |
reader (std::vector< T > &data_r, std::vector< int > &data_i) | |
Construct a variable reader using the specified vectors as the source of scalar and integer values for data. More... | |
~reader () | |
Destroy this variable reader. More... | |
size_t | available () |
Return the number of scalars remaining to be read. More... | |
size_t | available_i () |
Return the number of integers remaining to be read. More... | |
int | integer () |
Return the next integer in the integer sequence. More... | |
int | integer_constrain () |
Return the next integer in the integer sequence. More... | |
int | integer_constrain (T &) |
Return the next integer in the integer sequence. More... | |
T | scalar () |
Return the next scalar in the sequence. More... | |
T | scalar_constrain () |
Return the next scalar. More... | |
T | scalar_constrain (T &) |
Return the next scalar in the sequence, incrementing the specified reference with the log absolute Jacobian determinant. More... | |
std::vector< T > | std_vector (size_t m) |
Return a standard library vector of the specified dimensionality made up of the next scalars. More... | |
vector_t | vector (size_t m) |
Return a column vector of specified dimensionality made up of the next scalars. More... | |
vector_t | vector_constrain (size_t m) |
Return a column vector of specified dimensionality made up of the next scalars. More... | |
vector_t | vector_constrain (size_t m, T &) |
Return a column vector of specified dimensionality made up of the next scalars. More... | |
row_vector_t | row_vector (size_t m) |
Return a row vector of specified dimensionality made up of the next scalars. More... | |
row_vector_t | row_vector_constrain (size_t m) |
Return a row vector of specified dimensionality made up of the next scalars. More... | |
row_vector_t | row_vector_constrain (size_t m, T &) |
Return a row vector of specified dimensionality made up of the next scalars. More... | |
matrix_t | matrix (size_t m, size_t n) |
Return a matrix of the specified dimensionality made up of the next scalars arranged in column-major order. More... | |
matrix_t | matrix_constrain (size_t m, size_t n) |
Return a matrix of the specified dimensionality made up of the next scalars arranged in column-major order. More... | |
matrix_t | matrix_constrain (size_t m, size_t n, T &) |
Return a matrix of the specified dimensionality made up of the next scalars arranged in column-major order. More... | |
int | integer_lb (int lb) |
Return the next integer, checking that it is greater than or equal to the specified lower bound. More... | |
int | integer_lb_constrain (int lb) |
Return the next integer, checking that it is greater than or equal to the specified lower bound. More... | |
int | integer_lb_constrain (int lb, T &) |
Return the next integer, checking that it is greater than or equal to the specified lower bound. More... | |
int | integer_ub (int ub) |
Return the next integer, checking that it is less than or equal to the specified upper bound. More... | |
int | integer_ub_constrain (int ub) |
Return the next integer, checking that it is less than or equal to the specified upper bound. More... | |
int | integer_ub_constrain (int ub, T &) |
Return the next integer, checking that it is less than or equal to the specified upper bound. More... | |
int | integer_lub (int lb, int ub) |
Return the next integer, checking that it is less than or equal to the specified upper bound. More... | |
int | integer_lub_constrain (int lb, int ub) |
Return the next integer, checking that it is less than or equal to the specified upper bound. More... | |
int | integer_lub_constrain (int lb, int ub, T &) |
Return the next integer, checking that it is less than or equal to the specified upper bound. More... | |
T | scalar_pos () |
Return the next scalar, checking that it is positive. More... | |
T | scalar_pos_constrain () |
Return the next scalar, transformed to be positive. More... | |
T | scalar_pos_constrain (T &lp) |
Return the next scalar transformed to be positive, incrementing the specified reference with the log absolute determinant of the Jacobian. More... | |
template<typename TL > | |
T | scalar_lb (const TL lb) |
Return the next scalar, checking that it is greater than or equal to the specified lower bound. More... | |
template<typename TL > | |
T | scalar_lb_constrain (const TL lb) |
Return the next scalar transformed to have the specified lower bound. More... | |
template<typename TL > | |
T | scalar_lb_constrain (const TL lb, T &lp) |
Return the next scalar transformed to have the specified lower bound, incrementing the specified reference with the log of the absolute Jacobian determinant of the transform. More... | |
template<typename TU > | |
T | scalar_ub (TU ub) |
Return the next scalar, checking that it is less than or equal to the specified upper bound. More... | |
template<typename TU > | |
T | scalar_ub_constrain (const TU ub) |
Return the next scalar transformed to have the specified upper bound. More... | |
template<typename TU > | |
T | scalar_ub_constrain (const TU ub, T &lp) |
Return the next scalar transformed to have the specified upper bound, incrementing the specified reference with the log of the absolute Jacobian determinant of the transform. More... | |
template<typename TL , typename TU > | |
T | scalar_lub (const TL lb, const TU ub) |
Return the next scalar, checking that it is between the specified lower and upper bound. More... | |
template<typename TL , typename TU > | |
T | scalar_lub_constrain (const TL lb, const TU ub) |
Return the next scalar transformed to be between the specified lower and upper bounds. More... | |
template<typename TL , typename TU > | |
T | scalar_lub_constrain (TL lb, TU ub, T &lp) |
Return the next scalar transformed to be between the the specified lower and upper bounds. More... | |
T | prob () |
Return the next scalar, checking that it is a valid value for a probability, between 0 (inclusive) and 1 (inclusive). More... | |
T | prob_constrain () |
Return the next scalar transformed to be a probability between 0 and 1. More... | |
T | prob_constrain (T &lp) |
Return the next scalar transformed to be a probability between 0 and 1, incrementing the specified reference with the log of the absolute Jacobian determinant. More... | |
T | corr () |
Return the next scalar, checking that it is a valid value for a correlation, between -1 (inclusive) and 1 (inclusive). More... | |
T | corr_constrain () |
Return the next scalar transformed to be a correlation between -1 and 1. More... | |
T | corr_constrain (T &lp) |
Return the next scalar transformed to be a (partial) correlation between -1 and 1, incrementing the specified reference with the log of the absolute Jacobian determinant. More... | |
vector_t | unit_vector (size_t k) |
Return a unit_vector of the specified size made up of the next scalars. More... | |
Eigen::Matrix< T, Eigen::Dynamic, 1 > | unit_vector_constrain (size_t k) |
Return the next unit_vector transformed vector of the specified length. More... | |
vector_t | unit_vector_constrain (size_t k, T &lp) |
Return the next unit_vector of the specified size (using one fewer unconstrained scalars), incrementing the specified reference with the log absolute Jacobian determinant. More... | |
vector_t | simplex (size_t k) |
Return a simplex of the specified size made up of the next scalars. More... | |
Eigen::Matrix< T, Eigen::Dynamic, 1 > | simplex_constrain (size_t k) |
Return the next simplex transformed vector of the specified length. More... | |
vector_t | simplex_constrain (size_t k, T &lp) |
Return the next simplex of the specified size (using one fewer unconstrained scalars), incrementing the specified reference with the log absolute Jacobian determinant. More... | |
vector_t | ordered (size_t k) |
Return the next vector of specified size containing values in ascending order. More... | |
vector_t | ordered_constrain (size_t k) |
Return the next ordered vector of the specified length. More... | |
vector_t | ordered_constrain (size_t k, T &lp) |
Return the next ordered vector of the specified size, incrementing the specified reference with the log absolute Jacobian of the determinant. More... | |
vector_t | positive_ordered (size_t k) |
Return the next vector of specified size containing positive values in ascending order. More... | |
vector_t | positive_ordered_constrain (size_t k) |
Return the next positive ordered vector of the specified length. More... | |
vector_t | positive_ordered_constrain (size_t k, T &lp) |
Return the next positive_ordered vector of the specified size, incrementing the specified reference with the log absolute Jacobian of the determinant. More... | |
matrix_t | cholesky_factor (size_t M, size_t N) |
Return the next Cholesky factor with the specified dimensionality, reading it directly without transforms. More... | |
matrix_t | cholesky_factor_constrain (size_t M, size_t N) |
Return the next Cholesky factor with the specified dimensionality, reading from an unconstrained vector of the appropriate size. More... | |
matrix_t | cholesky_factor_constrain (size_t M, size_t N, T &lp) |
Return the next Cholesky factor with the specified dimensionality, reading from an unconstrained vector of the appropriate size, and increment the log probability reference with the log Jacobian adjustment for the transform. More... | |
matrix_t | cholesky_corr (size_t K) |
Return the next Cholesky factor for a correlation matrix with the specified dimensionality, reading it directly without transforms. More... | |
matrix_t | cholesky_corr_constrain (size_t K) |
Return the next Cholesky factor for a correlation matrix with the specified dimensionality, reading from an unconstrained vector of the appropriate size. More... | |
matrix_t | cholesky_corr_constrain (size_t K, T &lp) |
Return the next Cholesky factor for a correlation matrix with the specified dimensionality, reading from an unconstrained vector of the appropriate size, and increment the log probability reference with the log Jacobian adjustment for the transform. More... | |
matrix_t | cov_matrix (size_t k) |
Return the next covariance matrix with the specified dimensionality. More... | |
matrix_t | cov_matrix_constrain (size_t k) |
Return the next covariance matrix of the specified dimensionality. More... | |
matrix_t | cov_matrix_constrain (size_t k, T &lp) |
Return the next covariance matrix of the specified dimensionality, incrementing the specified reference with the log absolute Jacobian determinant. More... | |
matrix_t | corr_matrix (size_t k) |
Returns the next correlation matrix of the specified dimensionality. More... | |
matrix_t | corr_matrix_constrain (size_t k) |
Return the next correlation matrix of the specified dimensionality. More... | |
matrix_t | corr_matrix_constrain (size_t k, T &lp) |
Return the next correlation matrix of the specified dimensionality, incrementing the specified reference with the log absolute Jacobian determinant. More... | |
template<typename TL > | |
vector_t | vector_lb (const TL lb, size_t m) |
template<typename TL > | |
vector_t | vector_lb_constrain (const TL lb, size_t m) |
template<typename TL > | |
vector_t | vector_lb_constrain (const TL lb, size_t m, T &lp) |
template<typename TL > | |
row_vector_t | row_vector_lb (const TL lb, size_t m) |
template<typename TL > | |
row_vector_t | row_vector_lb_constrain (const TL lb, size_t m) |
template<typename TL > | |
row_vector_t | row_vector_lb_constrain (const TL lb, size_t m, T &lp) |
template<typename TL > | |
matrix_t | matrix_lb (const TL lb, size_t m, size_t n) |
template<typename TL > | |
matrix_t | matrix_lb_constrain (const TL lb, size_t m, size_t n) |
template<typename TL > | |
matrix_t | matrix_lb_constrain (const TL lb, size_t m, size_t n, T &lp) |
template<typename TU > | |
vector_t | vector_ub (const TU ub, size_t m) |
template<typename TU > | |
vector_t | vector_ub_constrain (const TU ub, size_t m) |
template<typename TU > | |
vector_t | vector_ub_constrain (const TU ub, size_t m, T &lp) |
template<typename TU > | |
row_vector_t | row_vector_ub (const TU ub, size_t m) |
template<typename TU > | |
row_vector_t | row_vector_ub_constrain (const TU ub, size_t m) |
template<typename TU > | |
row_vector_t | row_vector_ub_constrain (const TU ub, size_t m, T &lp) |
template<typename TU > | |
matrix_t | matrix_ub (const TU ub, size_t m, size_t n) |
template<typename TU > | |
matrix_t | matrix_ub_constrain (const TU ub, size_t m, size_t n) |
template<typename TU > | |
matrix_t | matrix_ub_constrain (const TU ub, size_t m, size_t n, T &lp) |
template<typename TL , typename TU > | |
vector_t | vector_lub (const TL lb, const TU ub, size_t m) |
template<typename TL , typename TU > | |
vector_t | vector_lub_constrain (const TL lb, const TU ub, size_t m) |
template<typename TL , typename TU > | |
vector_t | vector_lub_constrain (const TL lb, const TU ub, size_t m, T &lp) |
template<typename TL , typename TU > | |
row_vector_t | row_vector_lub (const TL lb, const TU ub, size_t m) |
template<typename TL , typename TU > | |
row_vector_t | row_vector_lub_constrain (const TL lb, const TU ub, size_t m) |
template<typename TL , typename TU > | |
row_vector_t | row_vector_lub_constrain (const TL lb, const TU ub, size_t m, T &lp) |
template<typename TL , typename TU > | |
matrix_t | matrix_lub (const TL lb, const TU ub, size_t m, size_t n) |
template<typename TL , typename TU > | |
matrix_t | matrix_lub_constrain (const TL lb, const TU ub, size_t m, size_t n) |
template<typename TL , typename TU > | |
matrix_t | matrix_lub_constrain (const TL lb, const TU ub, size_t m, size_t n, T &lp) |
A stream-based reader for integer, scalar, vector, matrix and array data types, with Jacobian calculations.
The template parameter T
represents the type of scalars and the values in vectors and matrices. The only requirement on the template type T
is that a double can be copied into it, as in
T t = 0.0;
This includes double
itself and the reverse-mode algorithmic differentiation class stan::math::var
.
For transformed values, the scalar type parameter T
must support the transforming operations, such as exp(x)
for positive-bounded variables. It must also support equality and inequality tests with double
values.
T | Basic scalar type. |
Definition at line 35 of file reader.hpp.
typedef Eigen::Map<matrix_t> stan::io::reader< T >::map_matrix_t |
Definition at line 65 of file reader.hpp.
typedef Eigen::Map<row_vector_t> stan::io::reader< T >::map_row_vector_t |
Definition at line 67 of file reader.hpp.
typedef Eigen::Map<vector_t> stan::io::reader< T >::map_vector_t |
Definition at line 66 of file reader.hpp.
typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::io::reader< T >::matrix_t |
Definition at line 61 of file reader.hpp.
typedef Eigen::Matrix<T, 1, Eigen::Dynamic> stan::io::reader< T >::row_vector_t |
Definition at line 63 of file reader.hpp.
typedef Eigen::Matrix<T, Eigen::Dynamic, 1> stan::io::reader< T >::vector_t |
Definition at line 62 of file reader.hpp.
|
inline |
Construct a variable reader using the specified vectors as the source of scalar and integer values for data.
This class holds a reference to the specified data vectors.
Attempting to read beyond the end of the data or integer value sequences raises a runtime exception.
data_r | Sequence of scalar values. |
data_i | Sequence of integer values. |
Definition at line 81 of file reader.hpp.
|
inline |
Destroy this variable reader.
Definition at line 92 of file reader.hpp.
|
inline |
Return the number of scalars remaining to be read.
Definition at line 99 of file reader.hpp.
|
inline |
Return the number of integers remaining to be read.
Definition at line 108 of file reader.hpp.
|
inline |
Return the next Cholesky factor for a correlation matrix with the specified dimensionality, reading it directly without transforms.
K | Rows and columns of Cholesky factor |
std::domain_error | if the matrix is not a valid Cholesky factor for a correlation matrix. |
Definition at line 1018 of file reader.hpp.
|
inline |
Return the next Cholesky factor for a correlation matrix with the specified dimensionality, reading from an unconstrained vector of the appropriate size.
K | Rows and columns of Cholesky factor. |
std::domain_error | if the matrix is not a valid Cholesky factor for a correlation matrix. |
Definition at line 1036 of file reader.hpp.
|
inline |
Return the next Cholesky factor for a correlation matrix with the specified dimensionality, reading from an unconstrained vector of the appropriate size, and increment the log probability reference with the log Jacobian adjustment for the transform.
K | Rows and columns of Cholesky factor |
lp | Log probability reference to increment. |
std::domain_error | if the matrix is not a valid Cholesky factor for a correlation matrix. |
Definition at line 1054 of file reader.hpp.
|
inline |
Return the next Cholesky factor with the specified dimensionality, reading it directly without transforms.
M | Rows of Cholesky factor |
N | Columns of Cholesky factor |
std::domain_error | if the matrix is not a valid Cholesky factor. |
Definition at line 965 of file reader.hpp.
|
inline |
Return the next Cholesky factor with the specified dimensionality, reading from an unconstrained vector of the appropriate size.
M | Rows of Cholesky factor |
N | Columns of Cholesky factor |
std::domain_error | if the matrix is not a valid Cholesky factor. |
Definition at line 983 of file reader.hpp.
|
inline |
Return the next Cholesky factor with the specified dimensionality, reading from an unconstrained vector of the appropriate size, and increment the log probability reference with the log Jacobian adjustment for the transform.
M | Rows of Cholesky factor | |
N | Columns of Cholesky factor | |
[in,out] | lp | log probability |
std::domain_error | if the matrix is not a valid Cholesky factor. |
Definition at line 1001 of file reader.hpp.
|
inline |
Return the next scalar, checking that it is a valid value for a correlation, between -1 (inclusive) and 1 (inclusive).
See stan::math::check_bounded(T)
.
std::runtime_error | if the value is not valid for a correlation |
Definition at line 734 of file reader.hpp.
|
inline |
Return the next scalar transformed to be a correlation between -1 and 1.
See stan::math::corr_constrain(T)
.
Definition at line 749 of file reader.hpp.
|
inline |
Return the next scalar transformed to be a (partial) correlation between -1 and 1, incrementing the specified reference with the log of the absolute Jacobian determinant.
See stan::math::corr_constrain(T,T&)
.
lp | The reference to the variable holding the log probability to increment. |
Definition at line 764 of file reader.hpp.
|
inline |
Returns the next correlation matrix of the specified dimensionality.
See stan::math::check_corr_matrix(Matrix)
.
k | Dimensionality of correlation matrix. |
std::runtime_error | if the matrix is not a correlation matrix |
Definition at line 1118 of file reader.hpp.
|
inline |
Return the next correlation matrix of the specified dimensionality.
See stan::math::corr_matrix_constrain(Matrix)
.
k | Dimensionality of correlation matrix. |
Definition at line 1133 of file reader.hpp.
|
inline |
Return the next correlation matrix of the specified dimensionality, incrementing the specified reference with the log absolute Jacobian determinant.
See stan::math::corr_matrix_constrain(Matrix,T&)
.
k | Dimensionality of the (square) correlation matrix. |
lp | Log probability reference to increment. |
Definition at line 1148 of file reader.hpp.
|
inline |
Return the next covariance matrix with the specified dimensionality.
See stan::math::check_cov_matrix(Matrix)
.
k | Dimensionality of covariance matrix. |
std::runtime_error | if the matrix is not a valid covariance matrix |
Definition at line 1072 of file reader.hpp.
|
inline |
Return the next covariance matrix of the specified dimensionality.
See stan::math::cov_matrix_constrain(Matrix)
.
k | Dimensionality of covariance matrix. |
Definition at line 1087 of file reader.hpp.
|
inline |
Return the next covariance matrix of the specified dimensionality, incrementing the specified reference with the log absolute Jacobian determinant.
See stan::math::cov_matrix_constrain(Matrix,T&)
.
k | Dimensionality of the (square) covariance matrix. |
lp | Log probability reference to increment. |
Definition at line 1103 of file reader.hpp.
|
inline |
Return the next integer in the integer sequence.
Definition at line 117 of file reader.hpp.
|
inline |
Return the next integer in the integer sequence.
This form is a convenience method to make compiling easier; its behavior is the same as int()
Definition at line 131 of file reader.hpp.
|
inline |
Return the next integer in the integer sequence.
This form is a convenience method to make compiling easier; its behavior is the same as integer()
Definition at line 142 of file reader.hpp.
|
inline |
Return the next integer, checking that it is greater than or equal to the specified lower bound.
lb | Lower bound. |
std::runtime_error | If the next integer read is not greater than or equal to the lower bound. |
Definition at line 342 of file reader.hpp.
|
inline |
Return the next integer, checking that it is greater than or equal to the specified lower bound.
lb | Lower bound. |
std::runtime_error | If the next integer read is not greater than or equal to the lower bound. |
Definition at line 358 of file reader.hpp.
|
inline |
Return the next integer, checking that it is greater than or equal to the specified lower bound.
lb | Lower bound. lp Log probability (ignored because no Jacobian) |
std::runtime_error | If the next integer read is not greater than or equal to the lower bound. |
Definition at line 371 of file reader.hpp.
|
inline |
Return the next integer, checking that it is less than or equal to the specified upper bound.
Even if the upper bounds and lower bounds are not consistent, the next integer value will be consumed.
lb | Lower bound. |
ub | Upper bound. |
std::runtime_error | If the next integer read is not less than or equal to the upper bound. |
Definition at line 430 of file reader.hpp.
|
inline |
Return the next integer, checking that it is less than or equal to the specified upper bound.
lb | Lower bound. |
ub | Upper bound. |
std::runtime_error | If the next integer read is not less than or equal to the upper bound. |
Definition at line 454 of file reader.hpp.
|
inline |
Return the next integer, checking that it is less than or equal to the specified upper bound.
lb | Lower bound. |
ub | Upper bound. lp Log probability (ignored because no Jacobian) |
std::runtime_error | If the next integer read is not less than or equal to the upper bound. |
Definition at line 468 of file reader.hpp.
|
inline |
Return the next integer, checking that it is less than or equal to the specified upper bound.
ub | Upper bound. |
std::runtime_error | If the next integer read is not less than or equal to the upper bound. |
Definition at line 385 of file reader.hpp.
|
inline |
Return the next integer, checking that it is less than or equal to the specified upper bound.
ub | Upper bound. |
std::runtime_error | If the next integer read is not less than or equal to the upper bound. |
Definition at line 401 of file reader.hpp.
|
inline |
Return the next integer, checking that it is less than or equal to the specified upper bound.
ub | Upper bound. lp Log probability (ignored because no Jacobian) |
std::runtime_error | If the next integer read is not less than or equal to the upper bound. |
Definition at line 414 of file reader.hpp.
|
inline |
Return a matrix of the specified dimensionality made up of the next scalars arranged in column-major order.
Row-major reading means that if a matrix of m=2
rows and n=3
columns is reada and the next scalar values are 1,2,3,4,5,6
, the result is
a = 1 4 2 5 3 6
m | Number of rows. |
n | Number of columns. |
Definition at line 292 of file reader.hpp.
|
inline |
Return a matrix of the specified dimensionality made up of the next scalars arranged in column-major order.
The constraint is a no-op. See matrix(size_t, size_t)
for more information.
m | Number of rows. |
n | Number of columns. |
Definition at line 308 of file reader.hpp.
|
inline |
Return a matrix of the specified dimensionality made up of the next scalars arranged in column-major order.
The constraint is a no-op, hence the log probability is not incremented. See matrix(size_t, size_t)
for more information.
m | Number of rows. |
n | Number of columns. lp Log probability to increment. |
Definition at line 326 of file reader.hpp.
|
inline |
Definition at line 1203 of file reader.hpp.
|
inline |
Definition at line 1212 of file reader.hpp.
|
inline |
Definition at line 1222 of file reader.hpp.
|
inline |
Definition at line 1359 of file reader.hpp.
|
inline |
Definition at line 1369 of file reader.hpp.
|
inline |
Definition at line 1379 of file reader.hpp.
|
inline |
Definition at line 1280 of file reader.hpp.
|
inline |
Definition at line 1289 of file reader.hpp.
|
inline |
Definition at line 1299 of file reader.hpp.
|
inline |
Return the next vector of specified size containing values in ascending order.
See stan::math::check_ordered(T)
for behavior on failure.
k | Size of returned vector. |
Definition at line 874 of file reader.hpp.
|
inline |
Return the next ordered vector of the specified length.
See stan::math::ordered_constrain(Matrix)
.
k | Length of returned vector. |
Definition at line 889 of file reader.hpp.
|
inline |
Return the next ordered vector of the specified size, incrementing the specified reference with the log absolute Jacobian of the determinant.
See stan::math::ordered_constrain(Matrix,T&)
.
k | Size of vector. |
lp | Log probability reference to increment. |
Definition at line 904 of file reader.hpp.
|
inline |
Return the next vector of specified size containing positive values in ascending order.
See stan::math::check_positive_ordered(T)
for behavior on failure.
k | Size of returned vector. |
Definition at line 918 of file reader.hpp.
|
inline |
Return the next positive ordered vector of the specified length.
See stan::math::positive_ordered_constrain(Matrix)
.
k | Length of returned vector. |
Definition at line 934 of file reader.hpp.
|
inline |
Return the next positive_ordered vector of the specified size, incrementing the specified reference with the log absolute Jacobian of the determinant.
See stan::math::positive_ordered_constrain(Matrix,T&)
.
k | Size of vector. |
lp | Log probability reference to increment. |
Definition at line 949 of file reader.hpp.
|
inline |
Return the next scalar, checking that it is a valid value for a probability, between 0 (inclusive) and 1 (inclusive).
See stan::math::check_bounded(T)
.
Definition at line 687 of file reader.hpp.
|
inline |
Return the next scalar transformed to be a probability between 0 and 1.
See stan::math::prob_constrain(T)
.
Definition at line 702 of file reader.hpp.
|
inline |
Return the next scalar transformed to be a probability between 0 and 1, incrementing the specified reference with the log of the absolute Jacobian determinant.
See stan::math::prob_constrain(T)
.
lp | Reference to log probability variable to increment. |
Definition at line 716 of file reader.hpp.
|
inline |
Return a row vector of specified dimensionality made up of the next scalars.
m | Number of rows in the vector to read. |
Definition at line 244 of file reader.hpp.
|
inline |
Return a row vector of specified dimensionality made up of the next scalars.
The constraint is a no-op.
m | Number of rows in the vector to read. |
Definition at line 256 of file reader.hpp.
|
inline |
Return a row vector of specified dimensionality made up of the next scalars.
The constraint is a no-op, so the log probability is not incremented.
m | Number of rows in the vector to read. lp Log probability to increment. |
Definition at line 270 of file reader.hpp.
|
inline |
Definition at line 1178 of file reader.hpp.
|
inline |
Definition at line 1186 of file reader.hpp.
|
inline |
Definition at line 1195 of file reader.hpp.
|
inline |
Definition at line 1334 of file reader.hpp.
|
inline |
Definition at line 1342 of file reader.hpp.
|
inline |
Definition at line 1351 of file reader.hpp.
|
inline |
Definition at line 1255 of file reader.hpp.
|
inline |
Definition at line 1263 of file reader.hpp.
|
inline |
Definition at line 1272 of file reader.hpp.
|
inline |
Return the next scalar in the sequence.
Definition at line 153 of file reader.hpp.
|
inline |
Return the next scalar.
For arbitrary scalars, constraint is a no-op.
Definition at line 165 of file reader.hpp.
|
inline |
Return the next scalar in the sequence, incrementing the specified reference with the log absolute Jacobian determinant.
With no transformation, the Jacobian increment is a no-op.
See scalar_constrain()
.
log_prob Reference to log probability variable to increment.
Definition at line 180 of file reader.hpp.
|
inline |
Return the next scalar, checking that it is greater than or equal to the specified lower bound.
See stan::math::check_greater_or_equal(T,double)
.
lb | Lower bound. |
TL | Type of lower bound. |
std::runtime_error | if the scalar is less than the specified lower bound |
Definition at line 528 of file reader.hpp.
|
inline |
Return the next scalar transformed to have the specified lower bound.
See stan::math::lb_constrain(T,double)
.
TL | Type of lower bound. |
lb | Lower bound on values. |
Definition at line 547 of file reader.hpp.
|
inline |
Return the next scalar transformed to have the specified lower bound, incrementing the specified reference with the log of the absolute Jacobian determinant of the transform.
See stan::math::lb_constrain(T,double,T&)
.
TL | Type of lower bound. |
lb | Lower bound on result. |
lp | Reference to log probability variable to increment. |
Definition at line 563 of file reader.hpp.
|
inline |
Return the next scalar, checking that it is between the specified lower and upper bound.
See stan::math::check_bounded(T, double, double)
.
TL | Type of lower bound. |
TU | Type of upper bound. |
lb | Lower bound. |
ub | Upper bound. |
std::runtime_error | if the scalar is not between the specified lower and upper bounds. |
Definition at line 636 of file reader.hpp.
|
inline |
Return the next scalar transformed to be between the specified lower and upper bounds.
See stan::math::lub_constrain(T, double, double)
.
TL | Type of lower bound. |
TU | Type of upper bound. |
lb | Lower bound. |
ub | Upper bound. |
Definition at line 657 of file reader.hpp.
|
inline |
Return the next scalar transformed to be between the the specified lower and upper bounds.
See stan::math::lub_constrain(T, double, double, T&)
.
lb | Lower bound. |
ub | Upper bound. |
lp | Reference to log probability variable to increment. |
T | Type of scalar. |
TL | Type of lower bound. |
TU | Type of upper bound. |
Definition at line 675 of file reader.hpp.
|
inline |
Return the next scalar, checking that it is positive.
See stan::math::check_positive(T)
.
std::runtime_error | if x is not positive |
Definition at line 483 of file reader.hpp.
|
inline |
Return the next scalar, transformed to be positive.
See stan::math::positive_constrain(T)
.
Definition at line 497 of file reader.hpp.
|
inline |
Return the next scalar transformed to be positive, incrementing the specified reference with the log absolute determinant of the Jacobian.
See stan::math::positive_constrain(T,T&)
.
lp | Reference to log probability variable to increment. |
Definition at line 511 of file reader.hpp.
Return the next scalar, checking that it is less than or equal to the specified upper bound.
See stan::math::check_less_or_equal(T,double)
.
TU | Type of upper bound. |
ub | Upper bound. |
std::runtime_error | if the scalar is greater than the specified upper bound |
Definition at line 582 of file reader.hpp.
|
inline |
Return the next scalar transformed to have the specified upper bound.
See stan::math::ub_constrain(T,double)
.
TU | Type of upper bound. |
ub | Upper bound on values. |
Definition at line 601 of file reader.hpp.
|
inline |
Return the next scalar transformed to have the specified upper bound, incrementing the specified reference with the log of the absolute Jacobian determinant of the transform.
See stan::math::ub_constrain(T,double,T&)
.
TU | Type of upper bound. |
ub | Upper bound on result. |
lp | Reference to log probability variable to increment. |
Definition at line 617 of file reader.hpp.
|
inline |
Return a simplex of the specified size made up of the next scalars.
See stan::math::check_simplex
.
k | Size of returned simplex. |
std::runtime_error | if the k values is not a simplex. |
Definition at line 826 of file reader.hpp.
|
inline |
Return the next simplex transformed vector of the specified length.
This operation consumes one less than the specified length number of scalars.
See stan::math::simplex_constrain(Eigen::Matrix)
.
k | Number of dimensions in resulting simplex. |
k-1
scalars. Definition at line 844 of file reader.hpp.
|
inline |
Return the next simplex of the specified size (using one fewer unconstrained scalars), incrementing the specified reference with the log absolute Jacobian determinant.
See stan::math::simplex_constrain(Eigen::Matrix,T&)
.
k | Size of simplex. |
lp | Log probability to increment with log absolute Jacobian determinant. |
Definition at line 860 of file reader.hpp.
|
inline |
Return a standard library vector of the specified dimensionality made up of the next scalars.
m | Size of vector. |
Definition at line 192 of file reader.hpp.
|
inline |
Return a unit_vector of the specified size made up of the next scalars.
See stan::math::check_unit_vector
.
k | Size of returned unit_vector. |
std::runtime_error | if the k values is not a unit_vector. |
Definition at line 778 of file reader.hpp.
|
inline |
Return the next unit_vector transformed vector of the specified length.
This operation consumes one less than the specified length number of scalars.
See stan::math::unit_vector_constrain(Eigen::Matrix)
.
k | Number of dimensions in resulting unit_vector. |
k
scalars. Definition at line 796 of file reader.hpp.
|
inline |
Return the next unit_vector of the specified size (using one fewer unconstrained scalars), incrementing the specified reference with the log absolute Jacobian determinant.
See stan::math::unit_vector_constrain(Eigen::Matrix,T&)
.
k | Size of unit_vector. |
lp | Log probability to increment with log absolute Jacobian determinant. |
Definition at line 812 of file reader.hpp.
|
inline |
Return a column vector of specified dimensionality made up of the next scalars.
m | Number of rows in the vector to read. |
Definition at line 207 of file reader.hpp.
|
inline |
Return a column vector of specified dimensionality made up of the next scalars.
The constraint is a no-op.
m | Number of rows in the vector to read. |
Definition at line 218 of file reader.hpp.
|
inline |
Return a column vector of specified dimensionality made up of the next scalars.
The constraint and hence Jacobian are no-ops.
m | Number of rows in the vector to read. lp Log probability to increment. |
Definition at line 230 of file reader.hpp.
|
inline |
Definition at line 1154 of file reader.hpp.
|
inline |
Definition at line 1162 of file reader.hpp.
|
inline |
Definition at line 1170 of file reader.hpp.
|
inline |
Definition at line 1308 of file reader.hpp.
|
inline |
Definition at line 1317 of file reader.hpp.
|
inline |
Definition at line 1326 of file reader.hpp.
|
inline |
Definition at line 1231 of file reader.hpp.
|
inline |
Definition at line 1239 of file reader.hpp.
|
inline |
Definition at line 1247 of file reader.hpp.