MADNESS  version 0.9
Classes | Namespaces | Macros | Enumerations | Functions

Defines and implements most of Tensor. More...

#include <madness/madness_config.h>
#include <madness/misc/ran.h>
#include <madness/world/posixmem.h>
#include <madness/world/shared_ptr.h>
#include <complex>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <madness/world/archive.h>
#include <madness/tensor/basetensor.h>
#include <madness/tensor/aligned.h>
#include <madness/tensor/mxm.h>
#include <madness/tensor/mtxmq.h>
#include <madness/tensor/tensorexcept.h>
#include <madness/tensor/tensoriter.h>
Include dependency graph for tensor.h:

Go to the source code of this file.

Classes

struct  madness::conditional_conj_struct< Q, iscomplex >
 For real types return value, for complex return conjugate. More...
 
struct  madness::conditional_conj_struct< Q, true >
 For real types return value, for complex return conjugate. More...
 
struct  madness::archive::ArchiveStoreImpl< Archive, Tensor< T > >
 Serialize a tensor. More...
 
struct  madness::archive::ArchiveLoadImpl< Archive, Tensor< T > >
 Deserialize a tensor ... existing tensor is replaced. More...
 

Namespaces

 std
 
 madness
 Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
 
 madness::detail
 
 madness::archive
 

Macros

#define HAVE_GENTENSOR   0
 
#define IS_ODD(n)   ((n)&0x1)
 
#define IS_UNALIGNED(p)   (((unsigned long)(p))&0x7)
 
#define TENSOR_ALIGNMENT   16
 

Enumerations

enum  madness::TensorType { madness::TT_NONE, madness::TT_FULL, madness::TT_2D }
 low rank representations of tensors (see gentensor.h) More...
 

Functions

template<typename Q >
madness::conditional_conj (const Q &coeff)
 For real types return value, for complex return conjugate. More...
 
template<typename T >
madness::detail::mynorm (T t)
 
template<typename T >
madness::detail::mynorm (std::complex< T > t)
 
template<class T >
std::ostream & madness::operator<< (std::ostream &s, const Tensor< T > &t)
 Print (for human consumption) a tensor to the stream. More...
 
template<typename T , typename Q >
IsSupported< TensorTypeData< Q >
, Tensor< T > >::type 
madness::operator+ (Q x, const Tensor< T > &t)
 The class defines tensor op scalar ... here define scalar op tensor. More...
 
template<typename T , typename Q >
IsSupported< TensorTypeData< Q >
, Tensor< T > >::type 
madness::operator* (const Q &x, const Tensor< T > &t)
 The class defines tensor op scalar ... here define scalar op tensor. More...
 
template<typename T , typename Q >
IsSupported< TensorTypeData< Q >
, Tensor< T > >::type 
madness::operator- (Q x, const Tensor< T > &t)
 The class defines tensor op scalar ... here define scalar op tensor. More...
 
template<class T >
Tensor< T > madness::copy (const Tensor< T > &t)
 Returns a new contiguous tensor that is a deep copy of the input. More...
 
template<class T , class Q >
Tensor< TENSOR_RESULT_TYPE(T, Q)> madness::transform_dir (const Tensor< T > &t, const Tensor< Q > &c, int axis)
 Transforms one dimension of the tensor t by the matrix c, returns new contiguous tensor. More...
 
template<class T >
Tensor< T > madness::transpose (const Tensor< T > &t)
 Returns a new deep copy of the transpose of the input tensor. More...
 
template<class T >
Tensor< T > madness::conj_transpose (const Tensor< T > &t)
 Returns a new deep copy of the complex conjugate transpose of the input tensor. More...
 
template<class T >
Tensor< T > madness::outer (const Tensor< T > &left, const Tensor< T > &right)
 Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...) More...
 
template<class T , class Q >
Tensor< TENSOR_RESULT_TYPE(T, Q)> madness::inner (const Tensor< T > &left, const Tensor< Q > &right, long k0=-1, long k1=0)
 Inner product ... result(i,j,...,p,q,...) = sum(z) left(i,j,...,z)*right(z,p,q,...) More...
 
template<class T , class Q >
void madness::inner_result (const Tensor< T > &left, const Tensor< Q > &right, long k0, long k1, Tensor< TENSOR_RESULT_TYPE(T, Q) > &result)
 Accumulate inner product into user provided, contiguous, correctly sized result tensor. More...
 
template<class T , class Q >
Tensor< TENSOR_RESULT_TYPE(T, Q)> madness::transform (const Tensor< T > &t, const Tensor< Q > &c)
 Transform all dimensions of the tensor t by the matrix c. More...
 
template<class T , class Q >
Tensor< TENSOR_RESULT_TYPE(T, Q)> madness::general_transform (const Tensor< T > &t, const Tensor< Q > c[])
 Transform all dimensions of the tensor t by distinct matrices c. More...
 
template<class T , class Q >
Tensor< TENSOR_RESULT_TYPE(T,
Q) > & 
madness::fast_transform (const Tensor< T > &t, const Tensor< Q > &c, Tensor< TENSOR_RESULT_TYPE(T, Q) > &result, Tensor< TENSOR_RESULT_TYPE(T, Q) > &workspace)
 Restricted but heavily optimized form of transform() More...
 
template<class T >
Tensor< typename Tensor< T >
::scalar_type > 
madness::abs (const Tensor< T > &t)
 Return a new tensor holding the absolute value of each element of t. More...
 
template<class T >
Tensor< typename Tensor< T >
::scalar_type > 
madness::arg (const Tensor< T > &t)
 Return a new tensor holding the argument of each element of t (complex types only) More...
 
template<class T >
Tensor< typename Tensor< T >
::scalar_type > 
madness::real (const Tensor< T > &t)
 Return a new tensor holding the real part of each element of t (complex types only) More...
 
template<class T >
Tensor< typename Tensor< T >
::scalar_type > 
madness::imag (const Tensor< T > &t)
 Return a new tensor holding the imaginary part of each element of t (complex types only) More...
 
template<class T >
Tensor< T > madness::conj (const Tensor< T > &t)
 Returns a new deep copy of the complex conjugate of the input tensor (complex types only) More...
 

Detailed Description

Defines and implements most of Tensor.

Macro Definition Documentation

#define HAVE_GENTENSOR   0
#define IS_ODD (   n)    ((n)&0x1)

Referenced by madness::fast_transform().

#define IS_UNALIGNED (   p)    (((unsigned long)(p))&0x7)

Referenced by madness::fast_transform().

#define TENSOR_ALIGNMENT   16