#include <symtensor/MultipoleBase.h>
template<typename Implementation, typename Tuple>
MultipoleBaseFromTuple class
Helper class for defining a multipole based on an std::tuple of tensors.
Template parameters | |
---|---|
Implementation | CRTP subclass |
Tuple | the std::tuple of tensors. This is typically produced using TensorSequence |
Base classes
-
template<class Implementation, typename ... Tensors>class MultipoleBase<Implementation, Tuple>
- Multipole base-type for use with CRTP implementations.
Public types
Public static variables
- static std::size_t Order constexpr
- Multipole order, equivalent to the rank of the highest contained tensor.
- static std::size_t NumTensors constexpr
- Number of contained elements, all assumed to be tensors. A multipole may have a scalar component; this is treated a tensor of rank 0.
Constructors
- static auto FromVector(const Vector& vector) -> ALWAYS_INLINE Implementation constexpr
- Creator method from a single vector.
Member access
Multipole-scalar operations
- auto operator+=(const T& scalar) -> Implementation& constexpr
- Element-wise addition of a scalar.
- auto operator-=(const T& scalar) -> Implementation& constexpr
- Element-wise subtraction of a scalar.
- auto operator*=(const T& scalar) -> Implementation& constexpr
- Element-wise multiplication by a scalar.
- auto operator/=(const T& scalar) -> Implementation& constexpr
- Element-wise division by a scalar.
- auto operator+(const T& scalar) const -> Implementation constexpr
- Element-wise addition of a scalar.
- auto operator-(const T& scalar) const -> Implementation constexpr
- Element-wise subtraction of a scalar.
- auto operator*(const T& scalar) const -> Implementation constexpr
- Element-wise multiplication by a scalar.
- auto operator/(const T& scalar) const -> Implementation constexpr
- Element-wise division by a scalar.
Multipole-multipole operations
- auto operator+=(const Implementation& other) -> Implementation& constexpr
- Element-wise addition with another multipole.
- auto operator-=(const Implementation& other) -> Implementation& constexpr
- Element-wise subtraction by another multipole.
- auto operator*=(const Implementation& other) -> Implementation& constexpr
- Element-wise multiplication by another multipole.
- auto operator/=(const Implementation& other) -> Implementation& constexpr
- Element-wise division by another multipole.
- auto operator+(const Implementation& other) const -> Implementation constexpr
- Element-wise addition with another multipole.
- auto operator-(const Implementation& other) const -> Implementation constexpr
- Element-wise subtraction by another multipole.
- auto operator*(const Implementation& other) const -> Implementation constexpr
- Element-wise multiplication by another multipole.
- auto operator/(const Implementation& other) const -> Implementation constexpr
- Element-wise division by another multipole.
Comparison operators
- auto operator==(const Self& other) const -> bool defaulted constexpr
- Comparison with another multipole.
std::tuple compatibility
- auto underlying_tuple() const -> const TensorTuple& constexpr
- direct access to the tuple of tensors which comprises the multipole
- auto underlying_tuple() -> TensorTuple& constexpr
- direct access to the tuple of tensors which comprises the multipole
- auto get() & -> auto& constexpr
- element access for use with structured bindings
- auto get() const & -> const auto& constexpr
- element access for use with structured bindings
- auto get() && -> auto&& constexpr
- element access for use with structured bindings