![]() |
Sleipnir C++ API
|
#include <sleipnir/autodiff/variable.hpp>
Public Member Functions | |
Variable ()=default | |
constexpr | Variable (std::nullptr_t) |
Variable (std::floating_point auto value) | |
Variable (std::integral auto value) | |
Variable (const detail::ExpressionPtr &expr) | |
constexpr | Variable (detail::ExpressionPtr &&expr) |
Variable & | operator= (double value) |
void | set_value (double value) |
Variable & | operator*= (const Variable &rhs) |
Variable & | operator/= (const Variable &rhs) |
Variable & | operator+= (const Variable &rhs) |
Variable & | operator-= (const Variable &rhs) |
double | value () |
ExpressionType | type () const |
Friends | |
class | detail::AdjointExpressionGraph |
template<int UpLo> | |
class SLEIPNIR_DLLEXPORT | Hessian |
class SLEIPNIR_DLLEXPORT | Jacobian |
SLEIPNIR_DLLEXPORT Variable | operator* (const Variable &lhs, const Variable &rhs) |
SLEIPNIR_DLLEXPORT Variable | operator/ (const Variable &lhs, const Variable &rhs) |
SLEIPNIR_DLLEXPORT Variable | operator+ (const Variable &lhs, const Variable &rhs) |
SLEIPNIR_DLLEXPORT Variable | operator- (const Variable &lhs, const Variable &rhs) |
SLEIPNIR_DLLEXPORT Variable | operator- (const Variable &lhs) |
SLEIPNIR_DLLEXPORT Variable | operator+ (const Variable &lhs) |
SLEIPNIR_DLLEXPORT Variable | abs (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | acos (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | asin (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | atan (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | atan2 (const Variable &y, const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | cos (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | cosh (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | erf (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | exp (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | hypot (const Variable &x, const Variable &y) |
SLEIPNIR_DLLEXPORT Variable | log (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | log10 (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | pow (const Variable &base, const Variable &power) |
SLEIPNIR_DLLEXPORT Variable | sign (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | sin (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | sinh (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | sqrt (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | tan (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | tanh (const Variable &x) |
SLEIPNIR_DLLEXPORT Variable | hypot (const Variable &x, const Variable &y, const Variable &z) |
An autodiff variable pointing to an expression node.
|
default |
Constructs a linear Variable with a value of zero.
|
inlineexplicitconstexpr |
Constructs an empty Variable.
|
inline |
|
inline |
|
inlineexplicit |
Constructs a Variable pointing to the specified expression.
expr | The autodiff variable. |
|
inlineexplicitconstexpr |
Constructs a Variable pointing to the specified expression.
expr | The autodiff variable. |
Variable-Variable compound multiplication operator.
rhs | Operator right-hand side. |
Variable-Variable compound addition operator.
rhs | Operator right-hand side. |
Variable-Variable compound subtraction operator.
rhs | Operator right-hand side. |
Variable-Variable compound division operator.
rhs | Operator right-hand side. |
|
inline |
|
inline |
|
inline |
Returns the type of this expression (constant, linear, quadratic, or nonlinear).
|
inline |
Returns the value of this variable.
std::abs() for Variables.
x | The argument. |
std::acos() for Variables.
x | The argument. |
std::asin() for Variables.
x | The argument. |
std::atan() for Variables.
x | The argument. |
std::atan2() for Variables.
y | The y argument. |
x | The x argument. |
std::cos() for Variables.
x | The argument. |
std::cosh() for Variables.
x | The argument. |
std::erf() for Variables.
x | The argument. |
std::exp() for Variables.
x | The argument. |
std::hypot() for Variables.
x | The x argument. |
y | The y argument. |
|
friend |
std::hypot() for Variables.
x | The x argument. |
y | The y argument. |
z | The z argument. |
std::log() for Variables.
x | The argument. |
std::log10() for Variables.
x | The argument. |
Variable-Variable multiplication operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
Unary plus operator.
lhs | Operand for unary plus. |
Variable-Variable addition operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
Unary minus operator.
lhs | Operand for unary minus. |
Variable-Variable subtraction operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
Variable-Variable division operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
std::pow() for Variables.
base | The base. |
power | The power. |
sign() for Variables.
x | The argument. |
std::sin() for Variables.
x | The argument. |
std::sinh() for Variables.
x | The argument. |
std::sqrt() for Variables.
x | The argument. |
std::tan() for Variables.
x | The argument. |
std::tanh() for Variables.
x | The argument. |