Automatic Differentiation
 
Loading...
Searching...
No Matches
stan::math::vari_view< T, require_all_t< is_eigen< T >, bool_constant<!is_plain_type< T >::value > > > Class Template Referencefinal

Detailed Description

template<typename T>
class stan::math::vari_view< T, require_all_t< is_eigen< T >, bool_constant<!is_plain_type< T >::value > > >

Definition at line 586 of file vari.hpp.

#include <vari.hpp>

+ Inheritance diagram for stan::math::vari_view< T, require_all_t< is_eigen< T >, bool_constant<!is_plain_type< T >::value > > >:

Public Types

using PlainObject = plain_type_t< T >
 
using value_type = std::decay_t< T >
 

Public Member Functions

template<typename S , typename K , require_assignable_t< value_type, S > * = nullptr, require_assignable_t< value_type, K > * = nullptr>
 vari_view (const S &val, const K &adj) noexcept
 
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
 
void set_zero_adjoint ()
 
void chain ()
 Apply the chain rule to this variable based on the variables on which it depends.
 
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.
 

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_
 
adj_
 

Static Public Attributes

static constexpr int RowsAtCompileTime = PlainObject::RowsAtCompileTime
 Number of rows known at compile time.
 
static constexpr int ColsAtCompileTime = PlainObject::ColsAtCompileTime
 Number of columns known at compile time.
 

Private Member Functions

vari_view< T, require_not_plain_type_t< T > > & derived ()
 Helper function to return a reference to the derived type.
 
const vari_view< T, require_not_plain_type_t< T > > & derived () const
 Helper function to return a constant reference to the derived type.
 

Private Attributes

friend Derived
 

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