Stan  1.0
probability, sampling & optimization
Classes | Namespaces | Functions
agrad_thread_safe.hpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <cmath>
#include <cstddef>
#include "stan/memory/stack_alloc.hpp"

Go to the source code of this file.

Classes

class  stan::agrad::vari
 The variable implementation base class. More...
 
class  stan::agrad::var
 Independent (input) and dependent (output) variables for gradients. More...
 

Namespaces

 stan
 Probability, optimization and sampling library.
 
 stan::agrad
 Function gradients via reverse-mode automatic differentiation.
 

Functions

bool stan::agrad::operator== (const var &a, const var &b)
 Equality operator comparing two variables' values (C++). More...
 
bool stan::agrad::operator== (const var &a, const double &b)
 Equality operator comparing a variable's value and a double (C++). More...
 
bool stan::agrad::operator== (const double &a, const var &b)
 Equality operator comparing a scalar and a variable's value (C++). More...
 
bool stan::agrad::operator!= (const var &a, const var &b)
 Inequality operator comparing two variables' values (C++). More...
 
bool stan::agrad::operator!= (const var &a, const double &b)
 Inequality operator comparing a variable's value and a double (C++). More...
 
bool stan::agrad::operator!= (const double &a, const var &b)
 Inequality operator comparing a double and a variable's value (C++). More...
 
bool stan::agrad::operator< (const var &a, const var &b)
 Less than operator comparing variables' values (C++). More...
 
bool stan::agrad::operator< (const var &a, const double &b)
 Less than operator comparing variable's value and a double (C++). More...
 
bool stan::agrad::operator< (const double &a, const var &b)
 Less than operator comparing a double and variable's value (C++). More...
 
bool stan::agrad::operator> (const var &a, const var &b)
 Greater than operator comparing variables' values (C++). More...
 
bool stan::agrad::operator> (const var &a, const double &b)
 Greater than operator comparing variable's value and double (C++). More...
 
bool stan::agrad::operator> (const double &a, const var &b)
 Greater than operator comparing a double and a variable's value (C++). More...
 
bool stan::agrad::operator<= (const var &a, const var &b)
 Less than or equal operator comparing two variables' values (C++). More...
 
bool stan::agrad::operator<= (const var &a, const double &b)
 Less than or equal operator comparing a variable's value and a scalar (C++). More...
 
bool stan::agrad::operator<= (const double &a, const var &b)
 Less than or equal operator comparing a double and variable's value (C++). More...
 
bool stan::agrad::operator>= (const var &a, const var &b)
 Greater than or equal operator comparing two variables' values (C++). More...
 
bool stan::agrad::operator>= (const var &a, const double &b)
 Greater than or equal operator comparing variable's value and double (C++). More...
 
bool stan::agrad::operator>= (const double &a, const var &b)
 Greater than or equal operator comparing double and variable's value (C++). More...
 
bool stan::agrad::operator! (const var &a)
 Prefix logical negation for the value of variables (C++). More...
 
var stan::agrad::operator+ (const var &a)
 Unary plus operator for variables (C++). More...
 
var stan::agrad::operator- (const var &a)
 Unary negation operator for variables (C++). More...
 
var stan::agrad::operator+ (const var &a, const var &b)
 Addition operator for variables (C++). More...
 
var stan::agrad::operator+ (const var &a, const double &b)
 Addition operator for variable and scalar (C++). More...
 
var stan::agrad::operator+ (const double &a, const var &b)
 Addition operator for scalar and variable (C++). More...
 
var stan::agrad::operator- (const var &a, const var &b)
 Subtraction operator for variables (C++). More...
 
var stan::agrad::operator- (const var &a, const double &b)
 Subtraction operator for variable and scalar (C++). More...
 
var stan::agrad::operator- (const double &a, const var &b)
 Subtraction operator for scalar and variable (C++). More...
 
var stan::agrad::operator* (const var &a, const var &b)
 Multiplication operator for two variables (C++). More...
 
var stan::agrad::operator* (const var &a, const double &b)
 Multiplication operator for a variable and a scalar (C++). More...
 
var stan::agrad::operator* (const double &a, const var &b)
 Multiplication operator for a scalar and a variable (C++). More...
 
var stan::agrad::operator/ (const var &a, const var &b)
 Division operator for two variables (C++). More...
 
var stan::agrad::operator/ (const var &a, const double &b)
 Division operator for dividing a variable by a scalar (C++). More...
 
var stan::agrad::operator/ (const double &a, const var &b)
 Division operator for dividing a scalar by a variable (C++). More...
 
var & stan::agrad::operator++ (var &a)
 Prefix increment operator for variables (C++). More...
 
var stan::agrad::operator++ (var &a, int dummy)
 Postfix increment operator for variables (C++). More...
 
var & stan::agrad::operator-- (var &a)
 Prefix decrement operator for variables (C++). More...
 
var stan::agrad::operator-- (var &a, int dummy)
 Postfix decrement operator for variables (C++). More...
 
var stan::agrad::exp (const var &a)
 Return the exponentiation of the specified variable (cmath). More...
 
var stan::agrad::log (const var &a)
 Return the natural log of the specified variable (cmath). More...
 
var stan::agrad::log10 (const var &a)
 Return the base 10 log of the specified variable (cmath). More...
 
var stan::agrad::sqrt (const var &a)
 Return the square root of the specified variable (cmath). More...
 
var stan::agrad::pow (const var &base, const var &exponent)
 Return the base raised to the power of the exponent (cmath). More...
 
var stan::agrad::pow (const var &base, const double &exponent)
 Return the base variable raised to the power of the exponent scalar (cmath). More...
 
var stan::agrad::pow (const double &base, const var &exponent)
 Return the base scalar raised to the power of the exponent variable (cmath). More...
 
var stan::agrad::cos (const var &a)
 Return the cosine of a radian-scaled variable (cmath). More...
 
var stan::agrad::sin (const var &a)
 Return the sine of a radian-scaled variable (cmath). More...
 
var stan::agrad::tan (const var &a)
 Return the tangent of a radian-scaled variable (cmath). More...
 
var stan::agrad::acos (const var &a)
 Return the principal value of the arc cosine of a variable, in radians (cmath). More...
 
var stan::agrad::asin (const var &a)
 Return the principal value of the arc sine, in radians, of the specified variable (cmath). More...
 
var stan::agrad::atan (const var &a)
 Return the principal value of the arc tangent, in radians, of the specified variable (cmath). More...
 
var stan::agrad::atan2 (const var &a, const var &b)
 Return the principal value of the arc tangent, in radians, of the first variable divided by the second (cmath). More...
 
var stan::agrad::atan2 (const var &a, const double &b)
 Return the principal value of the arc tangent, in radians, of the first variable divided by the second scalar (cmath). More...
 
var stan::agrad::atan2 (const double &a, const var &b)
 Return the principal value of the arc tangent, in radians, of the first scalar divided by the second variable (cmath). More...
 
var stan::agrad::cosh (const var &a)
 Return the hyperbolic cosine of the specified variable (cmath). More...
 
var stan::agrad::sinh (const var &a)
 Return the hyperbolic sine of the specified variable (cmath). More...
 
var stan::agrad::tanh (const var &a)
 Return the hyperbolic tangent of the specified variable (cmath). More...
 
var stan::agrad::fabs (const var &a)
 Return the absolute value of the variable (cmath). More...
 
var stan::agrad::floor (const var &a)
 Return the floor of the specified variable (cmath). More...
 
var stan::agrad::ceil (const var &a)
 Return the ceiling of the specified variable (cmath). More...
 
var stan::agrad::fmod (const var &a, const var &b)
 Return the floating point remainder after dividing the first variable by the second (cmath). More...
 
var stan::agrad::fmod (const var &a, const double &b)
 Return the floating point remainder after dividing the the first variable by the second scalar (cmath). More...
 
var stan::agrad::fmod (const double &a, const var &b)
 Return the floating point remainder after dividing the first scalar by the second variable (cmath). More...
 
var stan::agrad::abs (const var &a)
 Return the absolute value of the variable (std). More...
 

Variable Documentation

◆ ad_

double ad_
protected

Definition at line 188 of file agrad_thread_safe.hpp.

◆ avi_

vari* avi_
protected

Definition at line 154 of file agrad_thread_safe.hpp.

◆ bd_

double bd_
protected

Definition at line 177 of file agrad_thread_safe.hpp.

◆ bvi_

vari* bvi_
protected

Definition at line 165 of file agrad_thread_safe.hpp.

◆ cd_

double cd_
protected

Definition at line 216 of file agrad_thread_safe.hpp.

◆ cvi_

vari* cvi_
protected

Definition at line 202 of file agrad_thread_safe.hpp.

◆ exp_val_

const double exp_val_

Definition at line 456 of file agrad_thread_safe.hpp.

◆ memalloc_

memory::stack_alloc memalloc_

Definition at line 21 of file agrad_thread_safe.hpp.

◆ var_stack_

std::vector<vari*> var_stack_

Definition at line 20 of file agrad_thread_safe.hpp.


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