Automatic Differentiation
 
Loading...
Searching...
No Matches
stan::math::vari_cl_base< T > Class Template Referenceabstract

Detailed Description

template<typename T>
class stan::math::vari_cl_base< T >

Definition at line 14 of file vari.hpp.

#include <vari.hpp>

+ Inheritance diagram for stan::math::vari_cl_base< T >:

Public Member Functions

template<typename S , typename U , require_t< std::is_constructible< T, std::decay_t< S > > > * = nullptr, require_t< std::is_constructible< T, std::decay_t< U > > > * = nullptr>
 vari_cl_base (S &&val, U &&adj)
 Construct a matrix_cl variable implementation from a value and adjoint.
 
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 ()
 
auto block (int row, int col, int rows, int cols)
 Returns a view into a block of matrix.
 
auto transpose ()
 Returns a transposed view into the matrix.
 
auto as_column_vector_or_scalar ()
 Returns column vector view into the row or column vector.
 
auto reverse ()
 Returns reverse view into the row or column vector.
 
template<typename RowIndex , typename ColIndex >
auto index (const RowIndex &row_index, const ColIndex &col_index)
 Return indexed view into a matrix.
 
const Eigen::Index rows () const
 Return the number of rows for this class's val_ member.
 
const Eigen::Index cols () const
 Return the number of columns for this class's val_ member.
 
const Eigen::Index size () const
 Return the size of this class's val_ member.
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends.
 
virtual void set_zero_adjoint ()=0
 

Static Public Member Functions

static void * operator new (size_t nbytes) noexcept
 Allocate memory from the underlying memory pool.
 
static void operator delete (void *) noexcept
 Delete a pointer from the underlying memory pool.
 

Public Attributes

val_
 The value of this variable.
 
adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable.
 

The documentation for this class was generated from the following file: