WPILibC++ 2025.1.1
|
An autodiff variable pointing to an expression node. More...
Public Member Functions | |
Variable ()=default | |
Constructs a linear Variable with a value of zero. | |
Variable (double value) | |
Constructs a Variable from a double. | |
Variable (const detail::ExpressionPtr &expr) | |
Constructs a Variable pointing to the specified expression. | |
Variable (detail::ExpressionPtr &&expr) | |
Constructs a Variable pointing to the specified expression. | |
Variable & | operator= (double value) |
Assignment operator for double. | |
void | SetValue (double value) |
Sets Variable's internal value. | |
Variable & | operator*= (const Variable &rhs) |
Variable-Variable compound multiplication operator. | |
Variable & | operator/= (const Variable &rhs) |
Variable-Variable compound division operator. | |
Variable & | operator+= (const Variable &rhs) |
Variable-Variable compound addition operator. | |
Variable & | operator-= (const Variable &rhs) |
Variable-Variable compound subtraction operator. | |
double | Value () |
Returns the value of this variable. | |
ExpressionType | Type () const |
Returns the type of this expression (constant, linear, quadratic, or nonlinear). | |
Friends | |
class SLEIPNIR_DLLEXPORT | Hessian |
class SLEIPNIR_DLLEXPORT | Jacobian |
SLEIPNIR_DLLEXPORT Variable | operator* (const Variable &lhs, const Variable &rhs) |
Variable-Variable multiplication operator. | |
SLEIPNIR_DLLEXPORT Variable | operator/ (const Variable &lhs, const Variable &rhs) |
Variable-Variable division operator. | |
SLEIPNIR_DLLEXPORT Variable | operator+ (const Variable &lhs, const Variable &rhs) |
Variable-Variable addition operator. | |
SLEIPNIR_DLLEXPORT Variable | operator- (const Variable &lhs, const Variable &rhs) |
Variable-Variable subtraction operator. | |
SLEIPNIR_DLLEXPORT Variable | operator- (const Variable &lhs) |
Unary minus operator. | |
SLEIPNIR_DLLEXPORT Variable | operator+ (const Variable &lhs) |
Unary plus operator. | |
SLEIPNIR_DLLEXPORT Variable | abs (const Variable &x) |
std::abs() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | acos (const Variable &x) |
std::acos() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | asin (const Variable &x) |
std::asin() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | atan (const Variable &x) |
std::atan() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | atan2 (const Variable &y, const Variable &x) |
std::atan2() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | cos (const Variable &x) |
std::cos() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | cosh (const Variable &x) |
std::cosh() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | erf (const Variable &x) |
std::erf() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | exp (const Variable &x) |
std::exp() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | hypot (const Variable &x, const Variable &y) |
std::hypot() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | log (const Variable &x) |
std::log() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | log10 (const Variable &x) |
std::log10() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | pow (const Variable &base, const Variable &power) |
std::pow() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | sign (const Variable &x) |
sign() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | sin (const Variable &x) |
std::sin() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | sinh (const Variable &x) |
std::sinh() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | sqrt (const Variable &x) |
std::sqrt() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | tan (const Variable &x) |
std::tan() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | tanh (const Variable &x) |
std::tanh() for Variables. | |
SLEIPNIR_DLLEXPORT Variable | hypot (const Variable &x, const Variable &y, const Variable &z) |
std::hypot() for Variables. | |
An autodiff variable pointing to an expression node.
|
default |
Constructs a linear Variable with a value of zero.
|
inline |
|
inlineexplicit |
Constructs a Variable pointing to the specified expression.
expr | The autodiff variable. |
|
inlineexplicit |
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 |
Assignment operator for double.
value | The value of the Variable. |
|
inline |
|
inline |
Returns the type of this expression (constant, linear, quadratic, or nonlinear).
|
inline |
Returns the value of this variable.
|
friend |
std::abs() for Variables.
x | The argument. |
|
friend |
std::acos() for Variables.
x | The argument. |
|
friend |
std::asin() for Variables.
x | The argument. |
|
friend |
std::atan() for Variables.
x | The argument. |
|
friend |
std::atan2() for Variables.
y | The y argument. |
x | The x argument. |
|
friend |
std::cos() for Variables.
x | The argument. |
|
friend |
std::cosh() for Variables.
x | The argument. |
|
friend |
std::erf() for Variables.
x | The argument. |
|
friend |
std::exp() for Variables.
x | The argument. |
|
friend |
|
friend |
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. |
|
friend |
|
friend |
std::log() for Variables.
x | The argument. |
|
friend |
std::log10() for Variables.
x | The argument. |
|
friend |
Variable-Variable multiplication operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
friend |
Unary plus operator.
lhs | Operand for unary plus. |
|
friend |
Variable-Variable addition operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
friend |
Unary minus operator.
lhs | Operand for unary minus. |
|
friend |
Variable-Variable subtraction operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
friend |
Variable-Variable division operator.
lhs | Operator left-hand side. |
rhs | Operator right-hand side. |
|
friend |
std::pow() for Variables.
base | The base. |
power | The power. |
|
friend |
sign() for Variables.
x | The argument. |
|
friend |
std::sin() for Variables.
x | The argument. |
|
friend |
std::sinh() for Variables.
x | The argument. |
|
friend |
std::sqrt() for Variables.
x | The argument. |
|
friend |
std::tan() for Variables.
x | The argument. |
|
friend |
std::tanh() for Variables.
x | The argument. |