Stan Math Library  2.20.0
reverse mode automatic differentiation
Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
stan::math::internal::squared_distance_vv_vari Class Reference

#include <squared_distance.hpp>

Inheritance diagram for stan::math::internal::squared_distance_vv_vari:
stan::math::vari

Public Member Functions

template<int R1, int C1, int R2, int C2>
 squared_distance_vv_vari (const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
- Public Member Functions inherited from stan::math::vari
 vari (double x)
 Construct a variable implementation from a value. More...
 
 vari (double x, bool stacked)
 
virtual ~vari ()
 Throw an illegal argument exception. More...
 
void init_dependent ()
 Initialize the adjoint for this (dependent) variable to 1. More...
 
void set_zero_adjoint ()
 Set the adjoint value of this variable to 0. More...
 

Static Protected Member Functions

template<int R1, int C1, int R2, int C2>
static double var_squared_distance (const Eigen::Matrix< var, R1, C1 > &v1, const Eigen::Matrix< var, R2, C2 > &v2)
 

Protected Attributes

vari ** v1_
 
vari ** v2_
 
size_t length_
 

Additional Inherited Members

- Static Public Member Functions inherited from stan::math::vari
static void * operator new (size_t nbytes)
 Allocate memory from the underlying memory pool. More...
 
static void operator delete (void *)
 Delete a pointer from the underlying memory pool. More...
 
- Public Attributes inherited from stan::math::vari
const double val_
 The value of this variable. More...
 
double adj_
 The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More...
 

Detailed Description

Definition at line 16 of file squared_distance.hpp.

Constructor & Destructor Documentation

◆ squared_distance_vv_vari()

template<int R1, int C1, int R2, int C2>
stan::math::internal::squared_distance_vv_vari::squared_distance_vv_vari ( const Eigen::Matrix< var, R1, C1 > &  v1,
const Eigen::Matrix< var, R2, C2 > &  v2 
)
inline

Definition at line 38 of file squared_distance.hpp.

Member Function Documentation

◆ chain()

virtual void stan::math::internal::squared_distance_vv_vari::chain ( )
inlinevirtual

Apply the chain rule to this variable based on the variables on which it depends.

The base implementation in this class is a no-op.

Reimplemented from stan::math::vari.

Definition at line 51 of file squared_distance.hpp.

◆ var_squared_distance()

template<int R1, int C1, int R2, int C2>
static double stan::math::internal::squared_distance_vv_vari::var_squared_distance ( const Eigen::Matrix< var, R1, C1 > &  v1,
const Eigen::Matrix< var, R2, C2 > &  v2 
)
inlinestaticprotected

Definition at line 23 of file squared_distance.hpp.

Member Data Documentation

◆ length_

size_t stan::math::internal::squared_distance_vv_vari::length_
protected

Definition at line 20 of file squared_distance.hpp.

◆ v1_

vari** stan::math::internal::squared_distance_vv_vari::v1_
protected

Definition at line 18 of file squared_distance.hpp.

◆ v2_

vari** stan::math::internal::squared_distance_vv_vari::v2_
protected

Definition at line 19 of file squared_distance.hpp.


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

     [ Stan Home Page ] © 2011–2018, Stan Development Team.