template<typename T>
class stan::math::vari_value< T, require_eigen_sparse_base_t< T > >
The variable implementation for Eigen sparse 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 810 of file vari.hpp.
|
template<typename S , require_convertible_t< S &, T > * = nullptr> |
| vari_value (S &&x) |
| Construct a variable implementation from a value.
|
|
| vari_value (const arena_matrix< PlainObject > &val, const arena_matrix< PlainObject > &adj) |
|
template<typename S , require_convertible_t< S &, T > * = nullptr> |
| vari_value (S &&x, bool stacked) |
| Construct an sparse Eigen variable implementation from a value.
|
|
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.
|
|
const auto & | val () const |
| Return a constant reference to the value of this vari.
|
|
auto & | val_op () |
|
auto & | adj () |
| Return a reference to the derivative of the root expression with respect to this expression.
|
|
auto & | adj () const |
|
auto & | adj_op () |
|
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 () noexcept final |
| Set the adjoint value of this variable to 0.
|
|