template<typename T>
class stan::math::vari_value< T, require_all_t< is_plain_type< T >, is_eigen_dense_base< T > > >
The variable implementation for Eigen dense matrix types.
This class is complete (not abstract) and may be used for constants.
A variable implementation is constructed with a constant value. It also stores the adjoint for storing the partial derivative with respect to the root of the derivative tree.
Definition at line 645 of file vari.hpp.
|
template<typename S , require_assignable_t< T, S > * = nullptr> |
| vari_value (const S &x) |
| Construct a dense Eigen variable implementation from a value.
|
|
template<typename S , require_assignable_t< T, S > * = nullptr> |
| vari_value (const S &x, bool stacked) |
| Construct a dense Eigen variable implementation from a value.
|
|
const auto & | val () const noexcept |
| Return a constant reference to the value of this vari.
|
|
auto & | val_op () noexcept |
|
auto & | adj () noexcept |
| Return a reference to the derivative of the root expression with respect to this expression.
|
|
auto & | adj () const noexcept |
|
auto & | adj_op () noexcept |
|
virtual void | chain () |
| Apply the chain rule to this variable based on the variables on which it depends.
|
|
void | init_dependent () |
| Initialize the adjoint for this (dependent) variable to 1.
|
|
void | set_zero_adjoint () final |
| Set the adjoint value of this variable to 0.
|
|
auto | block (Eigen::Index start_row, Eigen::Index start_col, Eigen::Index num_rows, Eigen::Index num_cols) const |
| A block view of the underlying Eigen matrices.
|
|
auto | block (Eigen::Index start_row, Eigen::Index start_col, Eigen::Index num_rows, Eigen::Index num_cols) |
|
auto | head (Eigen::Index n) const |
| View of the head of Eigen vector types.
|
|
auto | head (Eigen::Index n) |
|
auto | tail (Eigen::Index n) const |
| View of the tail of the Eigen vector types.
|
|
auto | tail (Eigen::Index n) |
|
auto | segment (Eigen::Index i, Eigen::Index n) const |
| View block of N elements starting at position i
|
|
auto | segment (Eigen::Index i, Eigen::Index n) |
|
auto | transpose () const |
| View transpose of eigen matrix.
|
|
auto | transpose () |
|
auto | row (Eigen::Index i) const |
| View row of eigen matrices.
|
|
auto | row (Eigen::Index i) |
|
auto | col (Eigen::Index i) const |
| View column of eigen matrices.
|
|
auto | col (Eigen::Index i) |
|
auto | diagonal () const |
| View diagonal of eigen matrices.
|
|
auto | diagonal () |
|
auto | coeff (Eigen::Index i, Eigen::Index j) const |
| Get coefficient of eigen matrices.
|
|
auto | coeff (Eigen::Index i, Eigen::Index j) |
|
auto | coeff (Eigen::Index i) const |
| Get coefficient of eigen matrices.
|
|
auto | coeff (Eigen::Index i) |
|
auto | operator() (Eigen::Index i) const |
| Get coefficient of eigen matrices.
|
|
auto | operator() (Eigen::Index i) |
|
auto | operator() (Eigen::Index i, Eigen::Index j) const |
| Get coefficient of eigen matrices.
|
|
auto | operator() (Eigen::Index i, Eigen::Index j) |
|
auto | rowwise_reverse () const |
| Return an expression that operates on the rows of the matrix vari
|
|
auto | rowwise_reverse () |
|
auto | colwise_reverse () const |
| Return an expression that operates on the columns of the matrix vari
|
|
auto | colwise_reverse () |
|
auto | reverse () const |
| Return an expression to reverse the order of the coefficients inside of a vari matrix.
|
|
auto | reverse () |
|
auto | topRows (Eigen::Index n) const |
| Return a block consisting of the top rows.
|
|
auto | topRows (Eigen::Index n) |
|
auto | bottomRows (Eigen::Index n) const |
| Return a block consisting of the bottom rows.
|
|
auto | bottomRows (Eigen::Index n) |
|
auto | middleRows (Eigen::Index start_row, Eigen::Index n) const |
| Return a block consisting of rows in the middle.
|
|
auto | middleRows (Eigen::Index start_row, Eigen::Index n) |
|
auto | leftCols (Eigen::Index n) const |
| Return a block consisting of the left-most columns.
|
|
auto | leftCols (Eigen::Index n) |
|
auto | rightCols (Eigen::Index n) const |
| Return a block consisting of the right-most columns.
|
|
auto | rightCols (Eigen::Index n) |
|
auto | middleCols (Eigen::Index start_col, Eigen::Index n) const |
| Return a block consisting of columns in the middle.
|
|
auto | middleCols (Eigen::Index start_col, Eigen::Index n) |
|
auto | array () const |
| Return an Array expression.
|
|
auto | array () |
|
auto | matrix () const |
| Return a Matrix expression.
|
|
auto | matrix () |
|
Eigen::Index | rows () const |
| Return the number of rows for this class's val_ member.
|
|
Eigen::Index | cols () const |
| Return the number of columns for this class's val_ member.
|
|
Eigen::Index | size () const |
| Return the size of this class's val_ member.
|
|