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> | |
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 Vector s of dimension 3 | |
template<typename T , std::size_t N> | |
T | madness::inner (const Vector< T, N > &l, const Vector< T, N > &r) |
compute the inner product two Vector s. | |
template<typename T , typename U , std::size_t N> | |
Vector< T, N > | madness::operator* (T l, Vector< U, N > r) |
Scale a Vector . | |
template<typename T , std::size_t N, typename U > | |
Vector< T, N > | madness::operator* (Vector< T, N > l, const Vector< U, N > &r) |
Multiply (element-wise) two Vector s. | |
template<typename T , std::size_t N, typename U > | |
Vector< T, N > | madness::operator* (Vector< T, N > l, U r) |
Scale a Vector . | |
template<typename T , std::size_t N, typename U > | |
Vector< T, N > | madness::operator+ (Vector< T, N > l, const Vector< U, N > &r) |
Add (element-wise) two Vector s. | |
template<typename T , std::size_t N, typename U > | |
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 > | |
Vector< T, N > | madness::operator- (Vector< T, N > l, const Vector< U, N > &r) |
Subtract (element-wise) two Vector s. | |
template<typename T , std::size_t N, typename U > | |
Vector< T, N > | madness::operator- (Vector< T, N > l, U r) |
Subtract a scalar from a Vector . | |
template<typename T , std::size_t N> | |
void | madness::swap (Vector< T, N > &l, Vector< T, N > &r) |
Swap the contents of two Vector s. | |
template<typename T , std::size_t N> | |
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> | |
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.