|
DryChem 1.0.0
A generic, compile-time C++ toolbox with no dependencies for the modern computational chemistry project.
|
#include <vector3D.hpp>
Public Types | |
| using | value_type = T |
| Member types. | |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
| using | reference = typename std::array<T, 3>::reference |
| using | const_reference = typename std::array<T, 3>::const_reference |
| using | pointer = typename std::array<T, 3>::pointer |
| using | const_pointer = typename std::array<T, 3>::const_pointer |
| using | iterator = typename std::array<T, 3>::iterator |
| using | const_iterator = typename std::array<T, 3>::const_iterator |
| using | container_type = std::array<T, 3> |
| With this member type, we are now both a container and container adapter. | |
Public Member Functions | |
| constexpr | Vector3D () noexcept=default |
| Constructors. | |
| constexpr | Vector3D (T x_, T y_, T z_) noexcept |
| constexpr | Vector3D (const container_type &data_) noexcept |
| constexpr reference | at (size_type pos_) |
| Element access - reuse the definitions from the internal array. | |
| constexpr const_reference | at (size_type pos_) const |
| Could throw: array::at. | |
| constexpr reference | operator[] (size_type pos_) noexcept |
| Could throw: array::at. | |
| constexpr const_reference | operator[] (size_type pos_) const noexcept |
| constexpr iterator | begin () noexcept |
| Iterators - reuse the definitions from the internal array. | |
| constexpr const_iterator | begin () const noexcept |
| constexpr const_iterator | cbegin () const noexcept |
| constexpr iterator | end () noexcept |
| constexpr const_iterator | end () const noexcept |
| constexpr const_iterator | cend () const noexcept |
| constexpr bool | empty () const noexcept |
| Capacity - these are fixed due to our definition of the internal array. | |
| constexpr size_type | size () const noexcept |
| constexpr size_type | max_size () const noexcept |
| constexpr void | fill (const_reference value_) |
| Operations - reuse the definitions from the internal array. | |
| constexpr void | swap (Vector3D< T > &other_) |
Private Attributes | |
| std::array< T, 3 > | data {} |
Friends | |
| constexpr friend bool | operator== (const Vector3D< T > &lhs_, const Vector3D< T > &rhs_) |
| Comparison operators - reuse the definitions from the internal array. | |
| constexpr friend bool | operator< (const Vector3D< T > &lhs_, const Vector3D< T > &rhs_) |
A container adapter class for a mathematical/physical vector with three dimensions: x, y, z. For the most part, the functionality is delegated to the internal std::array<> and the type is defined using the tuple-like API so it can be used with structured bindings.
| T | - The type of the value we are storing in the Vector3D, must be default constructible |
| using CppUtils::Math::Vector3D< T, typename >::value_type = T |
| using CppUtils::Math::Vector3D< T, typename >::size_type = std::size_t |
| using CppUtils::Math::Vector3D< T, typename >::difference_type = std::ptrdiff_t |
| using CppUtils::Math::Vector3D< T, typename >::reference = typename std::array<T, 3>::reference |
| using CppUtils::Math::Vector3D< T, typename >::const_reference = typename std::array<T, 3>::const_reference |
| using CppUtils::Math::Vector3D< T, typename >::pointer = typename std::array<T, 3>::pointer |
| using CppUtils::Math::Vector3D< T, typename >::const_pointer = typename std::array<T, 3>::const_pointer |
| using CppUtils::Math::Vector3D< T, typename >::iterator = typename std::array<T, 3>::iterator |
| using CppUtils::Math::Vector3D< T, typename >::const_iterator = typename std::array<T, 3>::const_iterator |
| using CppUtils::Math::Vector3D< T, typename >::container_type = std::array<T, 3> |
|
constexprdefaultnoexcept |
Referenced by operator<, operator==, swap(), and Vector3D().
|
inlineconstexprnoexcept |
References data, and Vector3D().
|
inlineexplicitconstexprnoexcept |
References data.
|
inlineconstexpr |
References data.
|
inlineconstexpr |
References data.
|
inlineconstexprnoexcept |
References data.
|
inlineconstexprnoexcept |
References data.
|
inlineconstexprnoexcept |
References data.
|
inlineconstexprnoexcept |
References data.
|
inlineconstexprnoexcept |
References data.
|
inlineconstexprnoexcept |
References data.
|
inlineconstexprnoexcept |
References data.
|
inlineconstexprnoexcept |
References data.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
References data.
|
inlineconstexpr |
References data, and Vector3D().
|
friend |
References data, and Vector3D().
|
friend |
References data, and Vector3D().
|
private |
Referenced by at(), at(), begin(), begin(), cbegin(), cend(), end(), end(), fill(), operator<, operator==, operator[](), operator[](), swap(), Vector3D(), and Vector3D().