MADNESS 0.10.1
Classes | Namespaces | Functions
vector.h File Reference

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>
Include dependency graph for vector.h:
This graph shows which files directly or indirectly include this file:

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 Vectors 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 Vectors.
 
template<typename T , typename U , std::size_t N>
Vector< T, Nmadness::operator* (T l, Vector< U, N > r)
 Scale a Vector.
 
template<typename T , std::size_t N, typename U >
Vector< T, Nmadness::operator* (Vector< T, N > l, const Vector< U, N > &r)
 Multiply (element-wise) two Vectors.
 
template<typename T , std::size_t N, typename U >
Vector< T, Nmadness::operator* (Vector< T, N > l, U r)
 Scale a Vector.
 
template<typename T , std::size_t N, typename U >
Vector< T, Nmadness::operator+ (Vector< T, N > l, const Vector< U, N > &r)
 Add (element-wise) two Vectors.
 
template<typename T , std::size_t N, typename U >
Vector< T, Nmadness::operator+ (Vector< T, N > l, U r)
 Add a scalar to a Vector.
 
template<typename T , std::size_t N, typename U >
Vector< T, Nmadness::operator- (Vector< T, N > l, const Vector< U, N > &r)
 Subtract (element-wise) two Vectors.
 
template<typename T , std::size_t N, typename U >
Vector< T, Nmadness::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 Vectors.
 
template<typename T , std::size_t N>
Vector< T, Nmadness::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.
 

Detailed Description

Implement the madness:Vector class, an extension of std::array that supports some mathematical operations.