|
NEML2 2.1.0
|
Derivative wrapper. More...
Derivative wrapper.
#include <Derivative.h>
Public Member Functions | |
| Derivative ()=default | |
| Derivative (std::size_t intrsc_intmd_dim, const std::array< std::size_t, N+1 > &intrsc_intmd_dims, const std::array< TensorShapeRef, N+1 > &intmd_sizes, const std::array< TensorShapeRef, N+1 > &base_sizes, std::string var_name="", std::array< std::string, N > arg_names={}) | |
| std::string | name () const |
| Get the derivative name. | |
| const std::string & | var_name () const |
| Get the variable name. | |
| const std::string & | arg_name (std::size_t i) const |
| Get the i-th argument name. | |
| const Tensor & | tensor () const |
| Get the derivative. | |
| void | clear () |
| Clear the derivative. | |
| bool | defined () const |
| Whether this derivative contains defined value. | |
| bool | is_intrsc_intmd_broadcast () const |
| Whether this derivative represents a broadcast over intrinsic intermediate dimensions. | |
| Derivative< N > | reinterpret (std::size_t additional_intrsc_intmd_dim) const |
| Reinterpret the derivative to add additional intrinsic intermediate dimensions to the variable and arguments. | |
| Tensor | fullify () const |
| Derivative (const Derivative< N > &val)=default | |
| Derivative (Derivative< N > &&val)=default | |
| ~Derivative ()=default | |
| Derivative & | operator= (const Tensor &val) |
| Derivative & | operator= (const Derivative< N > &val)=default |
| Derivative & | operator= (Derivative< N > &&val) noexcept=default |
| Derivative & | operator+= (const Tensor &val) |
| Derivative & | operator+= (const Derivative< N > &val) |
| TensorShapeRef | intmd_sizes () const |
| TensorShapeRef | extrsc_intmd_sizes () const |
| TensorShapeRef | intrsc_intmd_sizes () const |
| TensorShapeRef | var_intmd_sizes () const |
| TensorShapeRef | var_intrsc_intmd_sizes () const |
| TensorShapeRef | arg_intmd_sizes (std::size_t i) const |
| TensorShapeRef | arg_intrsc_intmd_sizes (std::size_t i) const |
| TensorShape | base_sizes () const |
| TensorShapeRef | var_base_sizes () const |
| TensorShapeRef | arg_base_sizes (std::size_t i) const |
| Size | intmd_dim () const |
| Size | intrsc_intmd_dim () const |
| Size | var_intrsc_intmd_dim () const |
| Size | arg_intrsc_intmd_dim (std::size_t i) const |
| Size | base_dim () const |
| Size | var_base_dim () const |
| Size | arg_base_dim (std::size_t i) const |
|
default |
| Derivative | ( | std::size_t | intrsc_intmd_dim, |
| const std::array< std::size_t, N+1 > & | intrsc_intmd_dims, | ||
| const std::array< TensorShapeRef, N+1 > & | intmd_sizes, | ||
| const std::array< TensorShapeRef, N+1 > & | base_sizes, | ||
| std::string | var_name = "", | ||
| std::array< std::string, N > | arg_names = {} ) |
|
default |
|
default |
|
default |
| Size arg_base_dim | ( | std::size_t | i | ) | const |
| TensorShapeRef arg_base_sizes | ( | std::size_t | i | ) | const |
| TensorShapeRef arg_intmd_sizes | ( | std::size_t | i | ) | const |
| Size arg_intrsc_intmd_dim | ( | std::size_t | i | ) | const |
| TensorShapeRef arg_intrsc_intmd_sizes | ( | std::size_t | i | ) | const |
| const std::string & arg_name | ( | std::size_t | i | ) | const |
Get the i-th argument name.
| Size base_dim | ( | ) | const |
| TensorShape base_sizes | ( | ) | const |
| void clear | ( | ) |
Clear the derivative.
| bool defined | ( | ) | const |
Whether this derivative contains defined value.
| TensorShapeRef extrsc_intmd_sizes | ( | ) | const |
| Tensor fullify | ( | ) | const |
Convert the derivative with broadcasting intrinsic intermediate dimensions into a Tensor with full intrinsic intermediate dimensions. If this derivative is already full, simply returns the underlying tensor.
| Size intmd_dim | ( | ) | const |
Dimensions
| TensorShapeRef intmd_sizes | ( | ) | const |
Base shapes
| Size intrsc_intmd_dim | ( | ) | const |
| TensorShapeRef intrsc_intmd_sizes | ( | ) | const |
| bool is_intrsc_intmd_broadcast | ( | ) | const |
Whether this derivative represents a broadcast over intrinsic intermediate dimensions.
| std::string name | ( | ) | const |
Get the derivative name.
| Derivative & operator+= | ( | const Derivative< N > & | val | ) |
| Derivative & operator+= | ( | const Tensor & | val | ) |
Compound assignment operator
|
default |
| Derivative & operator= | ( | const Tensor & | val | ) |
Assignment operator
|
defaultnoexcept |
| Derivative< N > reinterpret | ( | std::size_t | additional_intrsc_intmd_dim | ) | const |
Reinterpret the derivative to add additional intrinsic intermediate dimensions to the variable and arguments.
| const Tensor & tensor | ( | ) | const |
Get the derivative.
| Size var_base_dim | ( | ) | const |
| TensorShapeRef var_base_sizes | ( | ) | const |
| TensorShapeRef var_intmd_sizes | ( | ) | const |
| Size var_intrsc_intmd_dim | ( | ) | const |
| TensorShapeRef var_intrsc_intmd_sizes | ( | ) | const |
| const std::string & var_name | ( | ) | const |
Get the variable name.