![]() |
Stan
2.10.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 58 of file reader.hpp.
typedef Eigen::Map<matrix_t> stan::io::reader< T >::map_matrix_t |
Definition at line 88 of file reader.hpp.
typedef Eigen::Map<row_vector_t> stan::io::reader< T >::map_row_vector_t |
Definition at line 90 of file reader.hpp.
typedef Eigen::Map<vector_t> stan::io::reader< T >::map_vector_t |
Definition at line 89 of file reader.hpp.
typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> stan::io::reader< T >::matrix_t |
Definition at line 84 of file reader.hpp.
typedef Eigen::Matrix<T, 1, Eigen::Dynamic> stan::io::reader< T >::row_vector_t |
Definition at line 86 of file reader.hpp.
typedef Eigen::Matrix<T, Eigen::Dynamic, 1> stan::io::reader< T >::vector_t |
Definition at line 85 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 104 of file reader.hpp.
|
inline |
Destroy this variable reader.
Definition at line 115 of file reader.hpp.
|
inline |
Return the number of scalars remaining to be read.
Definition at line 122 of file reader.hpp.
|
inline |
Return the number of integers remaining to be read.
Definition at line 131 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 1041 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 1059 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 1077 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 988 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 1006 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 1024 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 757 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 772 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 787 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 1141 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 1156 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 1171 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 1095 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 1110 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 1126 of file reader.hpp.
|
inline |
Return the next integer in the integer sequence.
Definition at line 140 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 154 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 165 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 365 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 381 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 394 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 453 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 477 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 491 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 408 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 424 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 437 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 315 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 331 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 349 of file reader.hpp.
|
inline |
Definition at line 1226 of file reader.hpp.
|
inline |
Definition at line 1235 of file reader.hpp.
|
inline |
Definition at line 1245 of file reader.hpp.
|
inline |
Definition at line 1382 of file reader.hpp.
|
inline |
Definition at line 1392 of file reader.hpp.
|
inline |
Definition at line 1402 of file reader.hpp.
|
inline |
Definition at line 1303 of file reader.hpp.
|
inline |
Definition at line 1312 of file reader.hpp.
|
inline |
Definition at line 1322 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 897 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 912 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 927 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 941 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 957 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 972 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 710 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 725 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 739 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 267 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 279 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 293 of file reader.hpp.
|
inline |
Definition at line 1201 of file reader.hpp.
|
inline |
Definition at line 1209 of file reader.hpp.
|
inline |
Definition at line 1218 of file reader.hpp.
|
inline |
Definition at line 1357 of file reader.hpp.
|
inline |
Definition at line 1365 of file reader.hpp.
|
inline |
Definition at line 1374 of file reader.hpp.
|
inline |
Definition at line 1278 of file reader.hpp.
|
inline |
Definition at line 1286 of file reader.hpp.
|
inline |
Definition at line 1295 of file reader.hpp.
|
inline |
Return the next scalar in the sequence.
Definition at line 176 of file reader.hpp.
|
inline |
Return the next scalar.
For arbitrary scalars, constraint is a no-op.
Definition at line 188 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 203 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 551 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 570 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 586 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 659 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 680 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 698 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 506 of file reader.hpp.
|
inline |
Return the next scalar, transformed to be positive.
See stan::math::positive_constrain(T)
.
Definition at line 520 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 534 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 605 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 624 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 640 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 849 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 867 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 883 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 215 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 801 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 819 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 835 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 230 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 241 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 253 of file reader.hpp.
|
inline |
Definition at line 1177 of file reader.hpp.
|
inline |
Definition at line 1185 of file reader.hpp.
|
inline |
Definition at line 1193 of file reader.hpp.
|
inline |
Definition at line 1331 of file reader.hpp.
|
inline |
Definition at line 1340 of file reader.hpp.
|
inline |
Definition at line 1349 of file reader.hpp.
|
inline |
Definition at line 1254 of file reader.hpp.
|
inline |
Definition at line 1262 of file reader.hpp.
|
inline |
Definition at line 1270 of file reader.hpp.