numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class of variables in backward-mode automatic differentiation [17]. More...
#include <num_collect/auto_diff/backward/variable.h>
Public Types | |
using | scalar_type = Scalar |
Type of scalars. | |
Public Member Functions | |
variable () | |
Constructor. | |
variable (const scalar_type &value) | |
Construct constants. | |
variable (const scalar_type &value, const constant_tag &) | |
Construct constants. | |
variable (const scalar_type &value, const variable_tag &) | |
Construct variables. | |
variable (const scalar_type &value, graph::node_ptr< scalar_type > node) | |
Constructor. | |
auto | node () const noexcept -> const graph::node_ptr< scalar_type > & |
Get the node. | |
auto | operator*= (const variable &right) -> variable & |
Multiply this variable by a variable. | |
auto | operator+= (const variable &right) -> variable & |
Add a variable to this variable. | |
auto | operator- () const -> variable |
Negate this variable. | |
auto | operator-= (const variable &right) -> variable & |
Subtract a variable from this variable. | |
auto | operator/= (const variable &right) -> variable & |
Divide this variable by a variable. | |
auto | value () const noexcept -> const scalar_type & |
Get the value. | |
Private Attributes | |
graph::node_ptr< scalar_type > | node_ |
Node. | |
scalar_type | value_ |
Value. | |
Class of variables in backward-mode automatic differentiation [17].
Scalar | Type of scalars. |
Definition at line 48 of file variable.h.
using num_collect::auto_diff::backward::variable< Scalar >::scalar_type = Scalar |
Type of scalars.
Definition at line 51 of file variable.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Constructor.
Definition at line 89 of file variable.h.
|
inlinenodiscardnoexcept |
|
inline |
Multiply this variable by a variable.
[in] | right | Right-hand-side variable. |
Definition at line 184 of file variable.h.
|
inline |
Add a variable to this variable.
[in] | right | Right-hand-side variable. |
Definition at line 130 of file variable.h.
|
inline |
|
inline |
Subtract a variable from this variable.
[in] | right | Right-hand-side variable. |
Definition at line 156 of file variable.h.
|
inline |
Divide this variable by a variable.
[in] | right | Right-hand-side variable. |
Definition at line 213 of file variable.h.
|
inlinenodiscardnoexcept |
|
private |
Node.
Definition at line 243 of file variable.h.
|
private |
Value.
Definition at line 240 of file variable.h.