|
MADNESS 0.10.1
|
Implement the madness:Vector class, an extension of std::array that supports some mathematical operations.
More...
#include <madness/madness_config.h>#include <madness/world/madness_exception.h>#include <madness/world/worldhash.h>#include <madness/world/array_addons.h>#include <madness/world/archive.h>#include <vector>#include <algorithm>#include <iostream>#include <math.h>

Go to the source code of this file.
Classes | |
| class | madness::Vector< T, N > |
| A simple, fixed dimension vector. More... | |
Namespaces | |
| namespace | madness |
| Namespace for all elements and tools of MADNESS. | |
Functions | |
| template<typename T , std::size_t N> | |
| constexpr std::enable_if< N==3, Vector< T, N > >::type | madness::cross (const Vector< T, N > &l, const Vector< T, N > &r) |
compute the cross product two Vectors of dimension 3 | |
| template<typename T , std::size_t N> | |
| constexpr T | madness::inner (const Vector< T, N > &l, const Vector< T, N > &r) |
compute the inner product two Vectors. | |
| template<typename T , typename U , std::size_t N> | |
| constexpr Vector< T, N > | madness::operator* (T l, Vector< U, N > r) |
Scale a Vector. | |
| template<typename T , std::size_t N, typename U > | |
| constexpr Vector< T, N > | madness::operator* (Vector< T, N > l, const Vector< U, N > &r) |
Multiply (element-wise) two Vectors. | |
| template<typename T , std::size_t N, typename U > | |
| constexpr Vector< T, N > | madness::operator* (Vector< T, N > l, U r) |
Scale a Vector. | |
| template<typename T , std::size_t N, typename U > | |
| constexpr Vector< T, N > | madness::operator+ (Vector< T, N > l, const Vector< U, N > &r) |
Add (element-wise) two Vectors. | |
| template<typename T , std::size_t N, typename U > | |
| constexpr Vector< T, N > | madness::operator+ (Vector< T, N > l, U r) |
Add a scalar to a Vector. | |
| template<typename T , std::size_t N, typename U > | |
| constexpr Vector< T, N > | madness::operator- (Vector< T, N > l, const Vector< U, N > &r) |
Subtract (element-wise) two Vectors. | |
| template<typename T , std::size_t N, typename U > | |
| constexpr Vector< T, N > | madness::operator- (Vector< T, N > l, U r) |
Subtract a scalar from a Vector. | |
| template<typename T , std::size_t N, typename U > | |
| constexpr Vector< T, N > | madness::operator/ (Vector< T, N > l, const Vector< U, N > &r) |
Divide (element-wise) two Vectors. | |
| template<typename T , std::size_t N> | |
| constexpr void | madness::swap (Vector< T, N > &l, Vector< T, N > &r) |
Swap the contents of two Vectors. | |
| template<typename T , std::size_t N> | |
| constexpr Vector< T, N > | madness::unitvec (const Vector< T, N > &r, const double eps=1.e-6) |
Construct a unit-Vector that has the same direction as r. | |
| template<typename T , typename... Ts> | |
| constexpr Vector< T, sizeof...(Ts)+1 > | madness::vec (T t, Ts... ts) |
Factory function for creating a madness::Vector. | |
Implement the madness:Vector class, an extension of std::array that supports some mathematical operations.