![]() |
Stan
1.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 stan::math::EigenType < T >::matrix | matrix_t |
| typedef stan::math::EigenType < T >::vector | vector_t |
| typedef stan::math::EigenType < T >::row_vector | 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. | |
| ~reader () | |
| Destroy this variable reader. | |
| size_t | available () |
| Return the number of scalars remaining to be read. | |
| size_t | available_i () |
| Return the number of integers remaining to be read. | |
| int | integer () |
| Return the next integer in the integer sequence. | |
| int | integer_constrain () |
| Return the next integer in the integer sequence. | |
| int | integer_constrain (T &log_prob) |
| Return the next integer in the integer sequence. | |
| T | scalar () |
| Return the next scalar in the sequence. | |
| T | scalar_constrain () |
| Return the next scalar. | |
| T | scalar_constrain (T &log_prob) |
| Return the next scalar in the sequence, incrementing the specified reference with the log absolute Jacobian determinant. | |
| std::vector< T > | std_vector (size_t m) |
| Return a standard library vector of the specified dimensionality made up of the next scalars. | |
| vector_t | vector (size_t m) |
| Return a column vector of specified dimensionality made up of the next scalars. | |
| vector_t | vector_constrain (size_t m) |
| Return a column vector of specified dimensionality made up of the next scalars. | |
| vector_t | vector_constrain (size_t m, T &lp) |
| Return a column vector of specified dimensionality made up of the next scalars. | |
| row_vector_t | row_vector (size_t m) |
| Return a row vector of specified dimensionality made up of the next scalars. | |
| row_vector_t | row_vector_constrain (size_t m) |
| Return a row vector of specified dimensionality made up of the next scalars. | |
| row_vector_t | row_vector_constrain (size_t m, T &lp) |
| Return a row vector of specified dimensionality made up of the next scalars. | |
| 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. | |
| 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. | |
| matrix_t | matrix_constrain (size_t m, size_t n, T &lp) |
| Return a matrix of the specified dimensionality made up of the next scalars arranged in column-major order. | |
| int | integer_lb (int lb) |
| Return the next integer, checking that it is greater than or equal to the specified lower bound. | |
| int | integer_lb_constrain (int lb) |
| Return the next integer, checking that it is greater than or equal to the specified lower bound. | |
| int | integer_lb_constrain (int lb, T &lp) |
| Return the next integer, checking that it is greater than or equal to the specified lower bound. | |
| int | integer_ub (int ub) |
| Return the next integer, checking that it is less than or equal to the specified upper bound. | |
| int | integer_ub_constrain (int ub) |
| Return the next integer, checking that it is less than or equal to the specified upper bound. | |
| int | integer_ub_constrain (int ub, T &lp) |
| Return the next integer, checking that it is less than or equal to the specified upper bound. | |
| int | integer_lub (int lb, int ub) |
| Return the next integer, checking that it is less than or equal to the specified upper bound. | |
| 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. | |
| int | integer_lub_constrain (int lb, int ub, T &lp) |
| Return the next integer, checking that it is less than or equal to the specified upper bound. | |
| T | scalar_pos () |
| Return the next scalar, checking that it is positive. | |
| T | scalar_pos_constrain () |
| Return the next scalar, transformed to be positive. | |
| 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. | |
| 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. | |
| template<typename TL > | |
| T | scalar_lb_constrain (const TL lb) |
| Return the next scalar transformed to have the specified lower bound. | |
| 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. | |
| 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. | |
| template<typename TU > | |
| T | scalar_ub_constrain (const TU ub) |
| Return the next scalar transformed to have the specified upper bound. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| T | prob () |
| Return the next scalar, checking that it is a valid value for a probability, between 0 (inclusive) and 1 (inclusive). | |
| T | prob_constrain () |
| Return the next scalar transformed to be a probability between 0 and 1. | |
| 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. | |
| T | corr () |
| Return the next scalar, checking that it is a valid value for a correlation, between -1 (inclusive) and 1 (inclusive). | |
| T | corr_constrain () |
| Return the next scalar transformed to be a correlation between -1 and 1. | |
| 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. | |
| vector_t | simplex (size_t k) |
| Return a simplex of the specified size made up of the next scalars. | |
| Eigen::Matrix< T, Eigen::Dynamic, 1 > | simplex_constrain (size_t k) |
| Return the next simplex transformed vector of the specified length. | |
| 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. | |
| vector_t | ordered (size_t k) |
| Return the next vector of specified size containing values in ascending order. | |
| vector_t | ordered_constrain (size_t k) |
| Return the next ordered vector of the specified length. | |
| 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. | |
| vector_t | positive_ordered (size_t k) |
| Return the next vector of specified size containing positive values in ascending order. | |
| vector_t | positive_ordered_constrain (size_t k) |
| Return the next positive ordered vector of the specified length. | |
| 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. | |
| matrix_t | corr_matrix (size_t k) |
| Returns the next correlation matrix of the specified dimensionality. | |
| matrix_t | corr_matrix_constrain (size_t k) |
| Return the next correlation matrix of the specified dimensionality. | |
| 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. | |
| matrix_t | cov_matrix (size_t k) |
| Return the next covariance matrix with the specified dimensionality. | |
| matrix_t | cov_matrix_constrain (size_t k) |
| Return the next covariance matrix of the specified dimensionality. | |
| 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. | |
| 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::agrad::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 45 of file reader.hpp.
| typedef Eigen::Map<matrix_t> stan::io::reader< T >::map_matrix_t |
Definition at line 78 of file reader.hpp.
| typedef Eigen::Map<row_vector_t> stan::io::reader< T >::map_row_vector_t |
Definition at line 80 of file reader.hpp.
| typedef Eigen::Map<vector_t> stan::io::reader< T >::map_vector_t |
Definition at line 79 of file reader.hpp.
| typedef stan::math::EigenType<T>::matrix stan::io::reader< T >::matrix_t |
Definition at line 74 of file reader.hpp.
| typedef stan::math::EigenType<T>::row_vector stan::io::reader< T >::row_vector_t |
Definition at line 76 of file reader.hpp.
| typedef stan::math::EigenType<T>::vector stan::io::reader< T >::vector_t |
Definition at line 75 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 94 of file reader.hpp.
|
inline |
Destroy this variable reader.
Definition at line 105 of file reader.hpp.
|
inline |
Return the number of scalars remaining to be read.
Definition at line 112 of file reader.hpp.
|
inline |
Return the number of integers remaining to be read.
Definition at line 121 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 731 of file reader.hpp.
|
inline |
Return the next scalar transformed to be a correlation between -1 and 1.
See stan::prob::corr_constrain(T).
Definition at line 745 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::prob::corr_constrain(T,T&).
| lp | The reference to the variable holding the log probability to increment. |
Definition at line 760 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 908 of file reader.hpp.
|
inline |
Return the next correlation matrix of the specified dimensionality.
See stan::prob::corr_matrix_constrain(Matrix).
| k | Dimensionality of correlation matrix. |
Definition at line 922 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::prob::corr_matrix_constrain(Matrix,T&).
| k | Dimensionality of the (square) correlation matrix. |
| lp | Log probability reference to increment. |
Definition at line 937 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 954 of file reader.hpp.
|
inline |
Return the next covariance matrix of the specified dimensionality.
See stan::prob::cov_matrix_constrain(Matrix).
| k | Dimensionality of covariance matrix. |
Definition at line 968 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::prob::cov_matrix_constrain(Matrix,T&).
| k | Dimensionality of the (square) covariance matrix. |
| lp | Log probability reference to increment. |
Definition at line 984 of file reader.hpp.
|
inline |
Return the next integer in the integer sequence.
Definition at line 130 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 144 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 155 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 298 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 312 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 328 of file reader.hpp.
|
inline |
Definition at line 1035 of file reader.hpp.
|
inline |
Definition at line 1043 of file reader.hpp.
|
inline |
Definition at line 1051 of file reader.hpp.
|
inline |
Definition at line 1176 of file reader.hpp.
|
inline |
Definition at line 1184 of file reader.hpp.
|
inline |
Definition at line 1192 of file reader.hpp.
|
inline |
Definition at line 1106 of file reader.hpp.
|
inline |
Definition at line 1114 of file reader.hpp.
|
inline |
Definition at line 1122 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 821 of file reader.hpp.
|
inline |
Return the next ordered vector of the specified length.
See stan::prob::ordered_constrain(Matrix).
| k | Length of returned vector. |
Definition at line 836 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::prob::ordered_constrain(Matrix,T&).
| k | Size of vector. |
| lp | Log probability reference to increment. |
Definition at line 851 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 865 of file reader.hpp.
|
inline |
Return the next positive ordered vector of the specified length.
See stan::prob::positive_ordered_constrain(Matrix).
| k | Length of returned vector. |
Definition at line 880 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::prob::positive_ordered_constrain(Matrix,T&).
| k | Size of vector. |
| lp | Log probability reference to increment. |
Definition at line 895 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 685 of file reader.hpp.
|
inline |
Return the next scalar transformed to be a probability between 0 and 1.
See stan::prob::prob_constrain(T).
Definition at line 699 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::prob::prob_constrain(T).
| lp | Reference to log probability variable to increment. |
Definition at line 713 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 253 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 264 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 277 of file reader.hpp.
|
inline |
Definition at line 1013 of file reader.hpp.
|
inline |
Definition at line 1020 of file reader.hpp.
|
inline |
Definition at line 1027 of file reader.hpp.
|
inline |
Definition at line 1154 of file reader.hpp.
|
inline |
Definition at line 1161 of file reader.hpp.
|
inline |
Definition at line 1168 of file reader.hpp.
|
inline |
Definition at line 1084 of file reader.hpp.
|
inline |
Definition at line 1091 of file reader.hpp.
|
inline |
Definition at line 1098 of file reader.hpp.
|
inline |
Return the next scalar in the sequence.
Definition at line 166 of file reader.hpp.
|
inline |
Return the next scalar.
For arbitrary scalars, constraint is a no-op.
Definition at line 178 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 193 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::prob::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::prob::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 635 of file reader.hpp.
|
inline |
Return the next scalar transformed to be between the specified lower and upper bounds.
See stan::prob::lub_constrain(T,double,double).
| TL | Type of lower bound. |
| TU | Type of upper bound. |
| lb | Lower bound. |
| ub | Upper bound. |
Definition at line 655 of file reader.hpp.
|
inline |
Return the next scalar transformed to be between the the specified lower and upper bounds.
See stan::prob::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 673 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::prob::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::prob::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::prob::ub_constrain(T,double).
| TU | Type of upper bound. |
| ub | Upper bound on values. |
Definition at line 600 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::prob::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 616 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 774 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::prob::simplex_constrain(Eigen::Matrix).
| k | Number of dimensions in resulting simplex. |
k-1 scalars. Definition at line 791 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::prob::simplex_constrain(Eigen::Matrix,T&).
| k | Size of simplex. |
| lp | Log probability to increment with log absolute Jacobian determinant. |
Definition at line 807 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 205 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 219 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 229 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 240 of file reader.hpp.
|
inline |
Definition at line 991 of file reader.hpp.
|
inline |
Definition at line 998 of file reader.hpp.
|
inline |
Definition at line 1005 of file reader.hpp.
|
inline |
Definition at line 1132 of file reader.hpp.
|
inline |
Definition at line 1139 of file reader.hpp.
|
inline |
Definition at line 1146 of file reader.hpp.
|
inline |
Definition at line 1062 of file reader.hpp.
|
inline |
Definition at line 1069 of file reader.hpp.
|
inline |
Definition at line 1076 of file reader.hpp.