1#ifndef STAN_MATH_FWD_CORE_FVAR_HPP
2#define STAN_MATH_FWD_CORE_FVAR_HPP
82 template <typename V, std::enable_if_t<ad_promotable<V, T>::value>* =
nullptr,
95 template <
typename V,
typename D>
require_not_t< std::is_same< std::decay_t< T >, std::decay_t< S > > > require_not_same_t
Require types T and S does not satisfy std::is_same.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
fvar< T > & operator/=(double x2)
Divide this value by the the specified variable and return a reference to this variable.
Scalar val() const
Return the value of this variable.
fvar< T > & operator--()
Decrement this variable by one and return a reference to this variable after the decrement.
fvar< T > & operator/=(const fvar< T > &x2)
Divide this variable by the the specified variable and return a reference to this variable.
fvar(const V &v)
Construct a forward variable with the specified value and zero tangent.
fvar< T > & operator*=(double x2)
Multiply this variable by the the specified value and return a reference to this variable.
fvar< T > & operator-=(const fvar< T > &x2)
Subtract the specified variable from this variable and return a reference to this variable.
Scalar d() const
Return the tangent (derivative) of this variable.
fvar(const V &v, const D &d)
Construct a forward variable with the specified value and tangent.
fvar< T > & operator-=(double x2)
Subtract the specified value from this variable and return a reference to this variable.
std::decay_t< T > Scalar
The type of values and tangents.
fvar< T > & operator++()
Increment this variable by one and return a reference to this variable after the increment.
fvar< T > operator++(int)
Increment this variable by one and return a reference to a copy of this variable before it was increm...
fvar< T > & operator+=(const fvar< T > &x2)
Add the specified variable to this variable and return a reference to this variable.
fvar< T > operator--(int)
Decrement this variable by one and return a reference to a copy of this variable before it was decrem...
fvar()
Construct a forward variable with zero value and tangent.
fvar< T > & operator*=(const fvar< T > &x2)
Multiply this variable by the the specified variable and return a reference to this variable.
Scalar val_
The value of this variable.
fvar< T > & operator+=(double x2)
Add the specified value to this variable and return a reference to this variable.
Scalar d_
The tangent (derivative) of this variable.
friend std::ostream & operator<<(std::ostream &os, const fvar< T > &v)
Write the value of the specified variable to the specified output stream, returning a reference to th...
This template class represents scalars used in forward-mode automatic differentiation,...