MADNESS
0.10.1
|
#include <gentensor.h>
Public Types | |
typedef TensorTypeData< T >::float_scalar_type | float_scalar_type |
C++ typename of the floating point type associated with scalar real type. More... | |
typedef TensorTypeData< T >::scalar_type | scalar_type |
C++ typename of the real type associated with a complex type. More... | |
Public Types inherited from madness::Tensor< T > | |
typedef TensorTypeData< T >::float_scalar_type | float_scalar_type |
C++ typename of the floating point type associated with scalar real type. More... | |
typedef TensorTypeData< T >::scalar_type | scalar_type |
C++ typename of the real type associated with a complex type. More... | |
typedef T | type |
C++ typename of this tensor. More... | |
Public Member Functions | |
GenTensor () | |
GenTensor ()=default | |
empty ctor More... | |
GenTensor (const GenTensor< T > &other)=default | |
copy ctor, shallow More... | |
GenTensor (const long ndim, const long *dims, const TensorType &tt) | |
GenTensor (const SliceLowRankTensor< T > &other) | |
ctor with a SliceLowRankTensor as argument, deep More... | |
GenTensor (const SRConf< T > &sr1) | |
GenTensor (const std::vector< long > &dim, const TensorArgs &targs) | |
ctor with dimensions; constructs tensor filled with zeros More... | |
GenTensor (const std::vector< long > &dim, const TensorType &tt) | |
ctor with dimensions; constructs tensor filled with zeros More... | |
GenTensor (const SVDTensor< T > &other) | |
ctor with a SVDTensor as argument, shallow More... | |
GenTensor (const Tensor< T > &other) | |
ctor with a regular Tensor, deep More... | |
GenTensor (const Tensor< T > &rhs, const double &thresh, const TensorType &tt) | |
ctor with a regular Tensor and arguments, deep More... | |
GenTensor (const Tensor< T > &rhs, const TensorArgs &targs) | |
ctor with a regular Tensor and arguments, deep More... | |
GenTensor (const Tensor< T > &t1) | |
GenTensor (const Tensor< T > &t1, const TensorArgs &targs) | |
GenTensor (const Tensor< T > &t1, double eps, const TensorType tt) | |
GenTensor (const TensorTrain< T > &other) | |
ctor with a TensorTrain as argument, shallow More... | |
GenTensor (const TensorType &tt, const long k, const long ndim) | |
ctor with dimensions; all dims have the same value k More... | |
GenTensor (const TensorType tt) | |
GenTensor (long nd, const long d[], const TensorType &tt) | |
GenTensor (std::vector< long > v, const TensorArgs &targs) | |
GenTensor (std::vector< long > v, const TensorType &tt) | |
void | add_SVD (const GenTensor &other, const double &thresh) |
void | add_SVD (const GenTensor< T > &rhs, const double &eps) |
SRConf< T > | config () const |
GenTensor | convert (const TensorArgs &targs) const |
GenTensor | convert (const TensorArgs &targs) const |
convert this to a new LowRankTensor of given tensor type More... | |
GenTensor & | convert_inplace (const TensorArgs &targs) |
long | dim (const int i) const |
return the number of entries in dimension i More... | |
const long * | dims () const |
return the number of entries in dimension i More... | |
GenTensor< T > & | emul (const GenTensor< T > &other) |
Inplace multiply by corresponding elements of argument Tensor. More... | |
GenTensor & | full_tensor () |
Tensor< T > & | full_tensor () |
GenTensor | full_tensor () const |
const Tensor< T > & | full_tensor () const |
Tensor< T > | full_tensor_copy () |
Tensor< T > | full_tensor_copy () const |
Tensor< T > | full_tensor_copy () const |
GenTensor & | gaxpy (const T alpha, const GenTensor &other, const T beta) |
GenTensor & | gaxpy (const T alpha, std::array< Slice, TENSOR_MAXDIM > s0, const GenTensor &other, const T beta, std::array< Slice, TENSOR_MAXDIM > s1) |
SRConf< T > | get_configs (const int &start, const int &end) const |
SVDTensor< T > & | get_svdtensor () |
SVDTensor< T > & | get_svdtensor () |
const SVDTensor< T > & | get_svdtensor () const |
const SVDTensor< T > & | get_svdtensor () const |
GenTensor & | get_tensor () |
Tensor< T > & | get_tensor () |
GenTensor | get_tensor () const |
const Tensor< T > & | get_tensor () const |
SVDTensor< T > & | get_tensortrain () |
TensorTrain< T > & | get_tensortrain () |
const SVDTensor< T > & | get_tensortrain () const |
const TensorTrain< T > & | get_tensortrain () const |
bool | has_data () const |
bool | has_data () const |
bool | has_no_data () const |
bool | has_no_data () const |
int | index () const |
bool | is_assigned () const |
bool | is_assigned () const |
constexpr bool | is_full_tensor () const |
constexpr bool | is_full_tensor () const |
bool | is_of_tensortype (const TensorType &tt) const |
bool | is_of_tensortype (const TensorType &tt) const |
constexpr bool | is_svd_tensor () const |
constexpr bool | is_svd_tensor () const |
constexpr bool | is_tensortrain () const |
constexpr bool | is_tensortrain () const |
size_t | nCoeff () const |
long | nCoeff () const |
long | ndim () const |
void | normalize () |
void | normalize () |
float_scalar_type | normf () const |
template<class Q > | |
operator GenTensor< Q > () const | |
Type conversion makes a deep copy. More... | |
template<class Q > | |
operator GenTensor< Q > () const | |
Type conversion makes a deep copy. More... | |
SliceLowRankTensor< T > | operator() (const std::vector< Slice > &s) |
general slicing, shallow; for temporary use only! More... | |
const SliceLowRankTensor< T > | operator() (const std::vector< Slice > &s) const |
general slicing, shallow; for temporary use only! More... | |
template<typename Q > | |
GenTensor< TENSOR_RESULT_TYPE(T, Q)> | operator* (const Q &x) const |
multiply with a number More... | |
GenTensor | operator+ (const GenTensor &other) |
GenTensor | operator+ (const SliceLowRankTensor< T > &other) |
GenTensor & | operator+= (const GenTensor &other) |
GenTensor & | operator+= (const SliceLowRankTensor< T > &other) |
GenTensor | operator- (const GenTensor &other) |
GenTensor & | operator-= (const GenTensor &other) |
GenTensor & | operator-= (const SliceLowRankTensor< T > &other) |
GenTensor & | operator= (const GenTensor< T > &other) |
shallow assignment operator More... | |
GenTensor & | operator= (const SliceLowRankTensor< T > &other) |
deep assignment with slices: g0 = g1(s) More... | |
GenTensor & | operator= (const SVDTensor< T > &other) |
deep assignment operator More... | |
GenTensor & | operator= (const T &number) |
assign a number to this tensor More... | |
GenTensor & | operator= (const Tensor< T > &other) |
deep assignment operator More... | |
GenTensor & | operator= (const TensorTrain< T > &other) |
deep assignment operator More... | |
const BaseTensor * | ptr () const |
might return a NULL pointer! More... | |
long | rank () const |
long | rank () const |
size_t | real_size () const |
long | real_size () const |
GenTensor | reconstruct_tensor () const |
Tensor< T > | reconstruct_tensor () const |
reconstruct this to return a full tensor More... | |
void | reduce_rank (const double &eps) |
void | reduce_rank (const double &thresh) |
template<typename Q > | |
IsSupported< TensorTypeData< Q >, GenTensor< T > & >::type | scale (Q fac) |
Inplace multiplication by scalar of supported type (legacy name) More... | |
long | size () const |
double | svd_normf () const |
float_scalar_type | svd_normf () const |
template<typename Q > | |
TENSOR_RESULT_TYPE (T, Q) trace_conj(const GenTensor< Q > &rhs) const | |
returns the trace of <this|rhs> More... | |
TensorType | tensor_type () const |
TensorType | tensor_type () const |
return the tensor type More... | |
std::string | what_am_i () const |
std::string | what_am_i () const |
Public Member Functions inherited from madness::Tensor< T > | |
Tensor () | |
Default constructor does not allocate any data and sets ndim=-1, size=0, _p=0, and id. More... | |
Tensor (const std::vector< long > &d, bool dozero=true) | |
Create and optionally zero new n-d tensor. This is the most general constructor. More... | |
Tensor (const Tensor< T > &t) | |
Copy constructor is shallow (same as assignment) More... | |
Tensor (long d0) | |
Create and zero new 1-d tensor. More... | |
Tensor (long d0, long d1) | |
Create and zero new 2-d tensor. More... | |
Tensor (long d0, long d1, long d2) | |
Create and zero new 3-d tensor. More... | |
Tensor (long d0, long d1, long d2, long d3) | |
Create and zero new 4-d tensor. More... | |
Tensor (long d0, long d1, long d2, long d3, long d4) | |
Create and zero new 5-d tensor. More... | |
Tensor (long d0, long d1, long d2, long d3, long d4, long d5) | |
Create and zero new 6-d tensor. More... | |
Tensor (long nd, const long d[], bool dozero=true) | |
Politically incorrect general constructor. More... | |
virtual | ~Tensor () |
scalar_type | absmax (long *ind=0) const |
Return the absolute maximum value (and if ind is non-null, its index) in the Tensor. More... | |
scalar_type | absmin (long *ind=0) const |
Return the absolute minimum value (and if ind is non-null, its index) in the Tensor. More... | |
BaseTensor * | base () |
Returns a pointer to the base class. More... | |
const BaseTensor * | base () const |
Returns a pointer to the base class. More... | |
template<class Q > | |
TensorIterator< T, Q > | binary_iterator (const Tensor< Q > &q, long iterlevel=0, bool optimize=true, bool fusedim=true, long jdim=default_jdim) const |
Return iterator over two tensors. More... | |
void | clear () |
Frees all memory and resests to state of default constructor. More... | |
template<class Q > | |
bool | conforms (const Tensor< Q > &t) const |
Test if *this and t conform. More... | |
Tensor< T > & | conj () |
Inplace complex conjugate. More... | |
Tensor< T > | cycledim (long nshift, long start, long end) |
Returns new view/tensor cycling the sub-dimensions (start,...,end) with shift steps. More... | |
const Tensor< T > | cycledim (long nshift, long start, long end) const |
Returns new view/tensor cycling the sub-dimensions (start,...,end) with shift steps. More... | |
Tensor< T > & | emul (const Tensor< T > &t) |
Inplace multiply by corresponding elements of argument Tensor. More... | |
const TensorIterator< T > & | end () const |
End point for forward iteration. More... | |
Tensor< T > & | fill (T x) |
Inplace fill with a scalar (legacy name) More... | |
Tensor< T > & | fillindex () |
Inplace fill with the index of each element. More... | |
Tensor< T > & | fillrandom () |
Inplace fill with random values ( [0,1] for floats, [0,MAXSIZE] for integers) More... | |
Tensor< T > | flat () |
Returns new view/tensor rehshaping to flat (1-d) tensor. More... | |
const Tensor< T > | flat () const |
Returns new view/tensor rehshaping to flat (1-d) tensor. More... | |
Tensor< T > | fusedim (long i) |
Returns new view/tensor fusing contiguous dimensions i and i+1 . More... | |
const Tensor< T > | fusedim (long i) const |
Returns new view/tensor fusing contiguous dimensions i and i+1 . More... | |
Tensor< T > & | gaxpy (T alpha, const Tensor< T > &t, T beta) |
Inplace generalized saxpy ... this = this*alpha + other*beta. More... | |
bool | has_data () const |
Tensor< T > | mapdim (const std::vector< long > &map) |
Returns new view/tensor permuting the dimensions. More... | |
const Tensor< T > | mapdim (const std::vector< long > &map) const |
Returns new view/tensor permuting the dimensions. More... | |
float_complex | max (long *ind) const |
double_complex | max (long *ind) const |
float_complex | max (long *ind) const |
double_complex | max (long *ind) const |
T | max (long *ind=0) const |
Return the maximum value (and if ind is non-null, its index) in the Tensor. More... | |
float_complex | min (long *ind) const |
double_complex | min (long *ind) const |
float_complex | min (long *ind) const |
double_complex | min (long *ind) const |
T | min (long *ind=0) const |
Return the minimum value (and if ind is non-null, its index) in the Tensor. More... | |
float_scalar_type | normf () const |
Returns the Frobenius norm of the tensor. More... | |
template<class Q > | |
operator Tensor< Q > () const | |
Type conversion makes a deep copy. More... | |
T & | operator() (const long ind[]) |
Politically incorrect general indexing operation without bounds checking. More... | |
const T & | operator() (const long ind[]) const |
Politically incorrect general indexing operation without bounds checking. More... | |
SliceTensor< T > | operator() (const Slice &s0) |
Return a 1d SliceTensor that views the specified range of the 1d Tensor. More... | |
const Tensor< T > | operator() (const Slice &s0) const |
Return a 1d SliceTensor that views the specified range of the 1d Tensor. More... | |
SliceTensor< T > | operator() (const Slice &s0, const Slice &s1) |
Return a 2d SliceTensor that views the specified range of the 2d Tensor. More... | |
const Tensor< T > | operator() (const Slice &s0, const Slice &s1) const |
Return a 2d constant Tensor that views the specified range of the 2d Tensor. More... | |
SliceTensor< T > | operator() (const Slice &s0, const Slice &s1, const Slice &s2) |
Return a 3d SliceTensor that views the specified range of the 3d Tensor. More... | |
const Tensor< T > | operator() (const Slice &s0, const Slice &s1, const Slice &s2) const |
Return a 3d constant Tensor that views the specified range of the 3d Tensor. More... | |
SliceTensor< T > | operator() (const Slice &s0, const Slice &s1, const Slice &s2, const Slice &s3) |
Return a 1-4d SliceTensor that views the specified range of the 4d Tensor. More... | |
const Tensor< T > | operator() (const Slice &s0, const Slice &s1, const Slice &s2, const Slice &s3) const |
Return a 1-4d constant Tensor that views the specified range of the 4d Tensor. More... | |
SliceTensor< T > | operator() (const Slice &s0, const Slice &s1, const Slice &s2, const Slice &s3, const Slice &s4) |
Return a 1-5d SliceTensor that views the specified range of the 5d Tensor. More... | |
const Tensor< T > | operator() (const Slice &s0, const Slice &s1, const Slice &s2, const Slice &s3, const Slice &s4) const |
Return a 1-5d constant Tensor that views the specified range of the 5d Tensor. More... | |
SliceTensor< T > | operator() (const Slice &s0, const Slice &s1, const Slice &s2, const Slice &s3, const Slice &s4, const Slice &s5) |
Return a 1-6d SliceTensor that views the specified range of the 6d Tensor. More... | |
const Tensor< T > | operator() (const Slice &s0, const Slice &s1, const Slice &s2, const Slice &s3, const Slice &s4, const Slice &s5) const |
Return a 1-6d constant Tensor that views the specified range of the 6d Tensor. More... | |
SliceTensor< T > | operator() (const Slice &s0, const Slice &s1, long k) |
Return a 2d SliceTensor that views the specified range of the 3d Tensor. More... | |
const Tensor< T > | operator() (const Slice &s0, const Slice &s1, long k) const |
Return a 2d constant Tensor that views the specified range of the 3d Tensor. More... | |
SliceTensor< T > | operator() (const Slice &s0, long j) |
Return a 1d SliceTensor that views the specified range of the 2d Tensor. More... | |
const Tensor< T > | operator() (const Slice &s0, long j) const |
Return a 1d constant Tensor that views the specified range of the 2d Tensor. More... | |
SliceTensor< T > | operator() (const Slice &s0, long j, const Slice &s2) |
Return a 2d SliceTensor that views the specified range of the 3d Tensor. More... | |
const Tensor< T > | operator() (const Slice &s0, long j, const Slice &s2) const |
Return a 2d constant Tensor that views the specified range of the 3d Tensor. More... | |
SliceTensor< T > | operator() (const Slice &s0, long j, long k) |
Return a 1d SliceTensor that views the specified range of the 3d Tensor. More... | |
const Tensor< T > | operator() (const Slice &s0, long j, long k) const |
Return a 1d constant Tensor that views the specified range of the 3d Tensor. More... | |
SliceTensor< T > | operator() (const std::array< Slice, TENSOR_MAXDIM > &s) |
General slicing operation. More... | |
const Tensor< T > | operator() (const std::array< Slice, TENSOR_MAXDIM > &s) const |
General slicing operation (const) More... | |
T & | operator() (const std::vector< long > ind) |
General indexing operation with bounds checking. More... | |
const T & | operator() (const std::vector< long > ind) const |
General indexing operation with bounds checking. More... | |
SliceTensor< T > | operator() (const std::vector< Slice > &s) |
General slicing operation. More... | |
const Tensor< T > | operator() (const std::vector< Slice > &s) const |
General slicing operation (const) More... | |
T & | operator() (long i) |
1-d indexing operation without bounds checking. More... | |
const T & | operator() (long i) const |
1-d indexing operation without bounds checking. More... | |
SliceTensor< T > | operator() (long i, const Slice &s1) |
Return a 1d SliceTensor that views the specified range of the 2d Tensor. More... | |
const Tensor< T > | operator() (long i, const Slice &s1) const |
Return a 1d SliceTensor that views the specified range of the 2d Tensor. More... | |
SliceTensor< T > | operator() (long i, const Slice &s1, const Slice &s2) |
Return a 2d SliceTensor that views the specified range of the 3d Tensor. More... | |
const Tensor< T > | operator() (long i, const Slice &s1, const Slice &s2) const |
Return a 2d constant Tensor that views the specified range of the 3d Tensor. More... | |
SliceTensor< T > | operator() (long i, const Slice &s1, long k) |
Return a 1d SliceTensor that views the specified range of the 3d Tensor. More... | |
const Tensor< T > | operator() (long i, const Slice &s1, long k) const |
Return a 1d constant Tensor that views the specified range of the 3d Tensor. More... | |
T & | operator() (long i, long j) |
2-d indexing operation without bounds checking. More... | |
const T & | operator() (long i, long j) const |
2-d indexing operation without bounds checking. More... | |
SliceTensor< T > | operator() (long i, long j, const Slice &s2) |
Return a 1d SliceTensor that views the specified range of the 3d Tensor. More... | |
const Tensor< T > | operator() (long i, long j, const Slice &s2) const |
Return a 1d constant Tensor that views the specified range of the 3d Tensor. More... | |
T & | operator() (long i, long j, long k) |
3-d indexing operation without bounds checking. More... | |
const T & | operator() (long i, long j, long k) const |
3-d indexing operation without bounds checking. More... | |
T & | operator() (long i, long j, long k, long l) |
4-d indexing operation without bounds checking. More... | |
const T & | operator() (long i, long j, long k, long l) const |
4-d indexing operation without bounds checking. More... | |
T & | operator() (long i, long j, long k, long l, long m) |
5-d indexing operation without bounds checking. More... | |
const T & | operator() (long i, long j, long k, long l, long m) const |
5-d indexing operation without bounds checking. More... | |
T & | operator() (long i, long j, long k, long l, long m, long n) |
6-d indexing operation without bounds checking. More... | |
const T & | operator() (long i, long j, long k, long l, long m, long n) const |
6-d indexing operation without bounds checking. More... | |
template<typename Q > | |
IsSupported< TensorTypeData< Q >, Tensor< TENSOR_RESULT_TYPE(T, Q)> >::type | operator* (const Q &x) const |
Multiplication of tensor by a scalar of a supported type to produce a new tensor. More... | |
template<typename Q > | |
IsSupported< TensorTypeData< Q >, Tensor< T > & >::type | operator*= (const Q &x) |
Inplace multiplication by scalar of supported type. More... | |
template<typename Q > | |
IsSupported< TensorTypeData< Q >, Tensor< TENSOR_RESULT_TYPE(T, Q)> >::type | operator+ (const Q &x) const |
Add a scalar of the same type to all elements of a tensor producing a new tensor. More... | |
template<typename Q > | |
Tensor< TENSOR_RESULT_TYPE(T, Q) > | operator+ (const Tensor< Q > &t) const |
Addition of two tensors to produce a new tensor. More... | |
template<typename Q > | |
IsSupported< TensorTypeData< Q >, Tensor< T > & >::type | operator+= (const Q &x) |
Inplace increment by scalar of supported type. More... | |
template<typename Q > | |
Tensor< T > & | operator+= (const Tensor< Q > &t) |
Inplace addition of two tensors. More... | |
Tensor< T > | operator- () const |
Unary negation producing a new tensor. More... | |
template<typename Q > | |
IsSupported< TensorTypeData< Q >, Tensor< TENSOR_RESULT_TYPE(T, Q)> >::type | operator- (const Q &x) const |
Subtract a scalar of the same type from all elements producing a new tensor. More... | |
template<typename Q > | |
Tensor< TENSOR_RESULT_TYPE(T, Q) > | operator- (const Tensor< Q > &t) const |
Subtraction of two tensors to produce a new tensor. More... | |
template<typename Q > | |
IsSupported< TensorTypeData< Q >, Tensor< T > & >::type | operator-= (const Q &x) |
Inplace decrement by scalar of supported type. More... | |
template<typename Q > | |
Tensor< T > & | operator-= (const Tensor< Q > &t) |
Inplace subtraction of two tensors. More... | |
template<typename Q > | |
IsSupported< TensorTypeData< Q >, Tensor< TENSOR_RESULT_TYPE(T, Q)> >::type | operator/ (const Q &x) const |
Divide tensor by a scalar of a supported type to produce a new tensor. More... | |
Tensor< T > & | operator= (const Tensor< T > &t) |
Assignment is shallow (same as copy constructor) More... | |
Tensor< T > & | operator= (T x) |
Inplace fill tensor with scalar. More... | |
T & | operator[] (long i) |
1-d indexing operation using [] without bounds checking. More... | |
const T & | operator[] (long i) const |
1-d indexing operation using [] without bounds checking. More... | |
T | product () const |
Return the product of all elements of the tensor. More... | |
T * | ptr () |
Returns a pointer to the internal data. More... | |
const T * | ptr () const |
Returns a pointer to the internal data. More... | |
Tensor< T > | reshape (const std::vector< long > &d) |
Returns new view/tensor reshaping size/number of dimensions to conforming tensor. More... | |
const Tensor< T > | reshape (const std::vector< long > &d) const |
Returns new view/tensor reshaping size/number of dimensions to conforming tensor. More... | |
Tensor< T > | reshape (int ndimnew, const long *d) |
Returns new view/tensor reshaping size/number of dimensions to conforming tensor. More... | |
const Tensor< T > | reshape (int ndimnew, const long *d) const |
Returns new view/tensor reshaping size/number of dimensions to conforming tensor. More... | |
Tensor< T > | reshape (long dim0) |
Returns new view/tensor rehapings to conforming 1-d tensor with given dimension. More... | |
const Tensor< T > | reshape (long dim0) const |
Returns new view/tensor rehapings to conforming 1-d tensor with given dimension. More... | |
Tensor< T > | reshape (long dim0, long dim1) |
Returns new view/tensor rehaping to conforming 2-d tensor with given dimensions. More... | |
const Tensor< T > | reshape (long dim0, long dim1) const |
Returns new view/tensor rehaping to conforming 2-d tensor with given dimensions. More... | |
Tensor< T > | reshape (long dim0, long dim1, long dim2) |
Returns new view/tensor rehaping to conforming 3-d tensor with given dimensions. More... | |
const Tensor< T > | reshape (long dim0, long dim1, long dim2) const |
Returns new view/tensor rehaping to conforming 3-d tensor with given dimensions. More... | |
Tensor< T > | reshape (long dim0, long dim1, long dim2, long dim3) |
Returns new view/tensor rehaping to conforming 4-d tensor with given dimensions. More... | |
const Tensor< T > | reshape (long dim0, long dim1, long dim2, long dim3) const |
Returns new view/tensor rehaping to conforming 4-d tensor with given dimensions. More... | |
Tensor< T > | reshape (long dim0, long dim1, long dim2, long dim3, long dim4) |
Returns new view/tensor rehaping to conforming 5-d tensor with given dimensions. More... | |
const Tensor< T > | reshape (long dim0, long dim1, long dim2, long dim3, long dim4) const |
Returns new view/tensor rehaping to conforming 5-d tensor with given dimensions. More... | |
Tensor< T > | reshape (long dim0, long dim1, long dim2, long dim3, long dim4, long dim5) |
Returns new view/tensor rehaping to conforming 6-d tensor with given dimensions. More... | |
const Tensor< T > | reshape (long dim0, long dim1, long dim2, long dim3, long dim4, long dim5) const |
Returns new view/tensor rehaping to conforming 6-d tensor with given dimensions. More... | |
template<typename Q > | |
IsSupported< TensorTypeData< Q >, Tensor< T > & >::type | scale (Q x) |
Inplace multiplication by scalar of supported type (legacy name) More... | |
Tensor< T > & | screen (double x) |
Inplace set elements of *this less than x in absolute magnitude to zero. More... | |
Tensor< T > | splitdim (long i, long dimi0, long dimi1) |
Returns new view/tensor splitting dimension i as dimi0*dimi1 to produce conforming d+1 dimension tensor. More... | |
const Tensor< T > | splitdim (long i, long dimi0, long dimi1) const |
Returns new view/tensor splitting dimension i as dimi0*dimi1 to produce conforming d+1 dimension tensor. More... | |
T | sum () const |
Returns the sum of all elements of the tensor. More... | |
T | sumsq () const |
Returns the sum of the squares of the elements. More... | |
Tensor< T > | swapdim (long idim, long jdim) |
Returns new view/tensor swaping dimensions i and j . More... | |
const Tensor< T > | swapdim (long idim, long jdim) const |
Returns new view/tensor swaping dimensions i and j . More... | |
template<class Q > | |
TENSOR_RESULT_TYPE (T, Q) trace_conj(const Tensor< Q > &t) const | |
Return the trace of two tensors with complex conjugate of the leftmost (i.e., this) More... | |
template<class Q , class R > | |
TensorIterator< T, Q, R > | ternary_iterator (const Tensor< Q > &q, const Tensor< R > &r, long iterlevel=0, bool optimize=true, bool fusedim=true, long jdim=default_jdim) const |
Return iterator over three tensors. More... | |
T | trace (const Tensor< T > &t) const |
Return the trace of two tensors (no complex conjugate invoked) More... | |
TensorIterator< T > | unary_iterator (long iterlevel=0, bool optimize=true, bool fusedim=true, long jdim=default_jdim) const |
Return iterator over single tensor. More... | |
template<typename opT > | |
Tensor< T > & | unaryop (opT &op) |
Inplace apply a unary function to each element of the tensor. More... | |
Public Member Functions inherited from madness::BaseTensor | |
BaseTensor () | |
virtual | ~BaseTensor () |
bool | conforms (const BaseTensor *t) const |
Returns true if this and *t are the same shape and size. More... | |
long | dim (int i) const |
Returns the size of dimension i . More... | |
const long * | dims () const |
Returns the array of tensor dimensions. More... | |
long | id () const |
Returns the typeid of the tensor (c.f., TensorTypeData<T> ) More... | |
bool | iscontiguous () const |
Returns true if the tensor refers to contiguous memory locations. More... | |
long | ndim () const |
Returns the number of dimensions in the tensor. More... | |
long | size () const |
Returns the number of elements in the tensor. More... | |
long | stride (int i) const |
Returns the stride associated with dimension i . More... | |
const long * | strides () const |
Returns the array of tensor strides. More... | |
Static Public Member Functions | |
static double | fac_reduce () |
return the additional safety for rank reduction More... | |
static double | fac_reduce () |
static double | facReduce () |
Static Public Member Functions inherited from madness::Tensor< T > | |
static bool | bounds_checking () |
Return true if bounds checking was enabled at compile time. More... | |
Static Public Member Functions inherited from madness::BaseTensor | |
static int | get_instance_count () |
Returns the count of all current instances of tensors & slice tensors of all types. More... | |
Private Attributes | |
std::variant< std::shared_ptr< Tensor< T > >, std::shared_ptr< SVDTensor< T > >, std::shared_ptr< TensorTrain< T > > > | tensor |
holding the implementation of the low rank tensor representations More... | |
Friends | |
GenTensor | copy (const GenTensor &other) |
deep copy More... | |
template<typename R , typename Q > | |
GenTensor< TENSOR_RESULT_TYPE(R, Q)> | general_transform (const GenTensor< R > &t, const Tensor< Q > c[]) |
Transform all dimensions of the tensor t by distinct matrices c. More... | |
template<typename Q , typename R > | |
bool | is_same_tensor_type (const GenTensor< R > &rhs, const GenTensor< Q > &lhs) |
class | SliceLowRankTensor< T > |
template<typename R , typename Q > | |
GenTensor< TENSOR_RESULT_TYPE(R, Q)> | transform (const GenTensor< R > &t, const Tensor< Q > &c) |
Transform all dimensions of the tensor t by the matrix c. More... | |
template<typename R , typename Q > | |
GenTensor< TENSOR_RESULT_TYPE(R, Q)> | transform_dir (const GenTensor< R > &t, const Tensor< Q > &c, const int axis) |
Transforms one dimension of the tensor t by the matrix c, returns new contiguous tensor. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from madness::Tensor< T > | |
void | allocate (long nd, const long d[], bool dozero) |
void | deallocate () |
Protected Member Functions inherited from madness::BaseTensor | |
void | cycledim_inplace (long shift, long start, long end) |
Cyclic shift of dimensions. More... | |
void | flat_inplace () |
Reshapes the tensor inplace into 1D. More... | |
void | fusedim_inplace (long i) |
Fuses dimensions i and i+1 . More... | |
void | mapdim_inplace (const std::vector< long > &map) |
General permutation of dimensions. More... | |
void | reshape_inplace (const std::vector< long > &d) |
Reshapes the tensor inplace. More... | |
void | reshape_inplace (int ndimnew, const long *d) |
Reshapes the tensor inplace. More... | |
void | set_dims_and_size (long nd, const long d[]) |
void | splitdim_inplace (long i, long dimi0, long dimi1) |
Splits dimension i . More... | |
void | swapdim_inplace (long i, long j) |
Swaps the dimensions. More... | |
Protected Attributes inherited from madness::Tensor< T > | |
T *MADNESS_RESTRICT | _p |
TENSOR_SHARED_PTR< T > | _shptr |
Protected Attributes inherited from madness::BaseTensor | |
long | _dim [TENSOR_MAXDIM] |
Size of each dimension. More... | |
long | _id |
Id from TensorTypeData<T> in type_data.h. More... | |
long | _ndim |
Number of dimensions (-1=invalid; 0=no supported; >0=tensor) More... | |
long | _size |
Number of elements in the tensor. More... | |
long | _stride [TENSOR_MAXDIM] |
Increment between elements in each dimension. More... | |
typedef TensorTypeData<T>::float_scalar_type madness::GenTensor< T >::float_scalar_type |
C++ typename of the floating point type associated with scalar real type.
typedef TensorTypeData<T>::scalar_type madness::GenTensor< T >::scalar_type |
C++ typename of the real type associated with a complex type.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References MADNESS_EXCEPTION.
|
inline |
|
default |
empty ctor
|
default |
copy ctor, shallow
|
inline |
|
inline |
ctor with dimensions; constructs tensor filled with zeros
|
inline |
ctor with dimensions; constructs tensor filled with zeros
|
inline |
ctor with dimensions; all dims have the same value k
|
inline |
ctor with a regular Tensor and arguments, deep
|
inline |
ctor with a regular Tensor and arguments, deep
References madness::GenTensor< T >::convert(), madness::GenTensor< T >::copy, madness::GenTensor< T >::facReduce(), MADNESS_EXCEPTION, madness::BaseTensor::size(), madness::GenTensor< T >::tensor, madness::TensorArgs::thresh, madness::TensorArgs::tt, madness::TT_2D, madness::TT_FULL, and madness::TT_TENSORTRAIN.
|
inline |
ctor with a regular Tensor, deep
References madness::GenTensor< T >::copy, and madness::GenTensor< T >::tensor.
|
inline |
ctor with a TensorTrain as argument, shallow
References madness::GenTensor< T >::copy, and madness::GenTensor< T >::tensor.
|
inline |
ctor with a SVDTensor as argument, shallow
References madness::GenTensor< T >::copy, and madness::GenTensor< T >::tensor.
|
inline |
ctor with a SliceLowRankTensor as argument, deep
|
inline |
References madness::GenTensor< T >::facReduce(), madness::GenTensor< T >::get_svdtensor(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), MADNESS_EXCEPTION, and thresh.
|
inline |
|
inline |
References MADNESS_EXCEPTION.
Referenced by madness::FunctionImpl< T, NDIM >::do_project_out().
|
inline |
References madness::GenTensor< T >::copy.
Referenced by madness::GenTensor< T >::GenTensor(), madness::FunctionImpl< T, NDIM >::assemble_coefficients(), madness::FunctionImpl< T, NDIM >::do_apply_directed_screening(), madness::FunctionImpl< T, NDIM >::do_apply_kernel3(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::operator()(), and test_convert().
|
inline |
convert this to a new LowRankTensor of given tensor type
References madness::GenTensor< T >::convert_inplace(), madness::GenTensor< T >::copy, madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_of_tensortype(), and madness::TensorArgs::tt.
|
inline |
References madness::GenTensor< T >::copy, madness::BaseTensor::dim(), madness::GenTensor< T >::dims(), madness::GenTensor< T >::full_tensor_copy(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::index(), madness::GenTensor< T >::is_assigned(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_of_tensortype(), madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), m, MADNESS_ASSERT, MADNESS_EXCEPTION, madness::BaseTensor::ndim(), madness::GenTensor< T >::ndim(), madness::SRConf< T >::normalize(), madness::print(), madness::GenTensor< T >::rank(), madness::Tensor< T >::reshape(), madness::BaseTensor::size(), madness::TensorArgs::thresh, madness::transpose(), madness::TensorArgs::tt, madness::TT_2D, madness::TT_FULL, and madness::TT_TENSORTRAIN.
Referenced by madness::GenTensor< T >::convert().
|
inline |
return the number of entries in dimension i
References madness::BaseTensor::dim(), madness::GenTensor< T >::is_assigned(), MADNESS_ASSERT, and madness::GenTensor< T >::ptr().
Referenced by madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::pointwise_multiplier(), madness::FunctionImpl< T, NDIM >::apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::FunctionNode< T, NDIM >::coeff(), madness::FunctionImpl< T, NDIM >::dirac_convolution_op(), madness::FunctionImpl< T, NDIM >::do_project_out(), madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), madness::TwoElectronInterface< T, NDIM >::initialize(), madness::FunctionImpl< T, NDIM >::NS_fcube_for_mul(), madness::FunctionImpl< T, NDIM >::NScoeffs2values(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_inner_local< R >::operator()(), madness::FunctionImpl< T, NDIM >::do_standard::operator()(), madness::operator<<(), madness::outer(), madness::FunctionImpl< T, NDIM >::parent_to_child_NS(), madness::FunctionImpl< T, NDIM >::partial_inner_contract(), madness::SeparatedConvolution< Q, NDIM >::partial_upsample(), madness::FunctionNode< T, NDIM >::print_json(), madness::FunctionNode< T, NDIM >::set_coeff(), madness::FunctionImpl< T, NDIM >::tnorm(), madness::FunctionImpl< T, NDIM >::values2NScoeffs(), and madness::FunctionImpl< T, NDIM >::verify_tree().
|
inline |
return the number of entries in dimension i
References madness::BaseTensor::dims(), madness::GenTensor< T >::is_assigned(), MADNESS_ASSERT, and madness::GenTensor< T >::ptr().
Referenced by madness::GenTensor< T >::GenTensor(), madness::FunctionImpl< T, NDIM >::assemble_coefficients(), and madness::GenTensor< T >::convert_inplace().
|
inline |
Inplace multiply by corresponding elements of argument Tensor.
References madness::GenTensor< T >::emul(), madness::GenTensor< T >::get_svdtensor(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_same_tensor_type, madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), MADNESS_ASSERT, and MADNESS_EXCEPTION.
Referenced by madness::GenTensor< T >::emul(), madness::FunctionImpl< T, NDIM >::multiply(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), and test_emul().
|
inlinestatic |
return the additional safety for rank reduction
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
References madness::GenTensor< T >::get_tensor().
|
inline |
Referenced by madness::FunctionImpl< T, NDIM >::add_scalar_inplace(), madness::FunctionImpl< T, NDIM >::do_project_out(), madness::FunctionImpl< T, NDIM >::multiply(), madness::FunctionImpl< T, NDIM >::hartree_op< LDIM, leaf_opT >::operator()(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_inner_local_on_demand< R >::operator()(), madness::FunctionImpl< T, NDIM >::do_unary_op_value_inplace< opT >::operator()(), madness::FunctionImpl< T, NDIM >::partial_inner_contract(), madness::GenTensor< T >::reconstruct_tensor(), and madness::FunctionImpl< T, NDIM >::unary_op_coeff_inplace().
|
inline |
References madness::GenTensor< T >::get_tensor().
|
inline |
References madness::GenTensor< T >::copy.
|
inline |
References madness::GenTensor< T >::copy.
Referenced by madness::FunctionImpl< T, NDIM >::assemble_coefficients(), madness::FunctionImpl< T, NDIM >::autorefine_square_test(), compute_difference(), madness::GenTensor< T >::convert_inplace(), madness::FunctionImpl< T, NDIM >::do_apply_directed_screening(), madness::Derivative< T, NDIM >::do_diff2b(), madness::FunctionImpl< T, NDIM >::err_box(), madness::FunctionImpl< T, NDIM >::eval(), madness::FunctionImpl< T, NDIM >::eval_local_only(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_inner_local_on_demand< R >::operator()(), madness::FunctionImpl< T, NDIM >::do_check_symmetry_local::operator()(), madness::FunctionImpl< T, NDIM >::do_mirror::operator()(), madness::FunctionImpl< T, NDIM >::do_map_and_mirror::operator()(), madness::outer(), madness::GenTensor< T >::reconstruct_tensor(), test(), test_general_transform(), and madness::FunctionImpl< T, NDIM >::trace_local().
|
inline |
References madness::GenTensor< T >::copy, madness::GenTensor< T >::get_svdtensor(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::is_assigned(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), and MADNESS_EXCEPTION.
|
inline |
References alpha, beta, madness::GenTensor< T >::gaxpy(), madness::GenTensor< T >::get_svdtensor(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::is_assigned(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_same_tensor_type, madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), MADNESS_ASSERT, and MADNESS_EXCEPTION.
Referenced by madness::GenTensor< T >::gaxpy(), madness::FunctionNode< T, NDIM >::gaxpy_inplace(), madness::FunctionImpl< T, NDIM >::add_op::operator()(), madness::GenTensor< T >::operator+(), madness::GenTensor< T >::operator+=(), madness::GenTensor< T >::operator-(), madness::GenTensor< T >::operator-=(), and madness::FunctionImpl< T, NDIM >::vtransform_doit().
|
inline |
References alpha, beta, madness::GenTensor< T >::gaxpy(), madness::GenTensor< T >::get_svdtensor(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::is_assigned(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_same_tensor_type, madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), MADNESS_ASSERT, MADNESS_EXCEPTION, and s0.
|
inline |
References MADNESS_EXCEPTION.
|
inline |
References MADNESS_EXCEPTION.
Referenced by madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::pointwise_multiplier(), madness::GenTensor< T >::add_SVD(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::FunctionImpl< T, NDIM >::dirac_convolution_op(), madness::FunctionImpl< T, NDIM >::do_apply_directed_screening(), madness::GenTensor< T >::emul(), madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), madness::GenTensor< T >::full_tensor_copy(), madness::SliceLowRankTensor< T >::gaxpy(), madness::GenTensor< T >::gaxpy(), madness::GenTensor< T >::nCoeff(), madness::GenTensor< T >::normalize(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::GenTensor< T >::operator=(), madness::SliceLowRankTensor< T >::operator=(), madness::FunctionImpl< T, NDIM >::partial_inner_contract(), madness::GenTensor< T >::rank(), madness::GenTensor< T >::real_size(), madness::GenTensor< T >::reduce_rank(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::screen(), madness::GenTensor< T >::svd_normf(), madness::GenTensor< T >::TENSOR_RESULT_TYPE(), and test_addition().
|
inline |
|
inline |
References MADNESS_EXCEPTION.
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by madness::GenTensor< T >::add_SVD(), madness::convert(), madness::GenTensor< T >::convert(), madness::GenTensor< T >::convert_inplace(), madness::GenTensor< T >::emul(), madness::GenTensor< T >::full_tensor(), madness::GenTensor< T >::full_tensor_copy(), madness::SliceLowRankTensor< T >::gaxpy(), madness::GenTensor< T >::gaxpy(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), madness::GenTensor< T >::nCoeff(), madness::GenTensor< T >::operator GenTensor< Q >(), madness::GenTensor< T >::operator=(), madness::SliceLowRankTensor< T >::operator=(), madness::outer(), madness::GenTensor< T >::real_size(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::screen(), and madness::GenTensor< T >::TENSOR_RESULT_TYPE().
|
inline |
|
inline |
References MADNESS_EXCEPTION.
Referenced by madness::GenTensor< T >::add_SVD(), madness::GenTensor< T >::convert_inplace(), madness::GenTensor< T >::emul(), madness::GenTensor< T >::full_tensor_copy(), madness::SliceLowRankTensor< T >::gaxpy(), madness::GenTensor< T >::gaxpy(), madness::GenTensor< T >::nCoeff(), madness::GenTensor< T >::operator=(), madness::SliceLowRankTensor< T >::operator=(), madness::outer(), madness::GenTensor< T >::rank(), madness::GenTensor< T >::real_size(), madness::GenTensor< T >::reduce_rank(), and madness::GenTensor< T >::TENSOR_RESULT_TYPE().
|
inline |
|
inline |
References MADNESS_EXCEPTION.
|
inline |
|
inline |
References madness::GenTensor< T >::size().
Referenced by madness::FunctionNode< T, NDIM >::accumulate(), madness::FunctionImpl< T, NDIM >::apply_source_driven(), madness::FunctionImpl< T, NDIM >::assemble_coefficients(), madness::FunctionNode< T, NDIM >::consolidate_buffer(), madness::SliceLowRankTensor< T >::gaxpy(), madness::FunctionNode< T, NDIM >::has_coeff(), madness::GenTensor< T >::has_no_data(), madness::FunctionImpl< T, NDIM >::recursive_apply_op2< opT >::operator()(), madness::accumulate_op< T, NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_truncate_NS_leafs::operator()(), madness::FunctionImpl< T, NDIM >::do_check_symmetry_local::operator()(), madness::FunctionImpl< T, NDIM >::project_out2(), madness::FunctionNode< T, NDIM >::set_coeff(), and madness::FunctionImpl< T, NDIM >::verify_tree().
|
inline |
References madness::GenTensor< T >::size().
|
inline |
References madness::GenTensor< T >::has_data().
Referenced by madness::Leaf_op< T, NDIM, opT, specialboxT >::compare_to_parent(), madness::FunctionImpl< T, NDIM >::do_project_out(), madness::SliceLowRankTensor< T >::gaxpy(), and madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()().
|
inline |
References madness::GenTensor< T >::has_data().
|
inline |
References madness::GenTensor< T >::is_assigned(), and madness::GenTensor< T >::tensor.
Referenced by madness::GenTensor< T >::convert_inplace(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_of_tensortype(), madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), and madness::GenTensor< T >::tensor_type().
|
inline |
References madness::GenTensor< T >::size().
Referenced by madness::GenTensor< T >::convert_inplace(), madness::GenTensor< T >::dim(), madness::GenTensor< T >::dims(), madness::GenTensor< T >::full_tensor_copy(), madness::GenTensor< T >::gaxpy(), madness::GenTensor< T >::get_svdtensor(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::index(), madness::GenTensor< T >::ndim(), madness::operator<<(), madness::GenTensor< T >::operator=(), madness::FunctionImpl< T, NDIM >::partial_inner_contract(), madness::GenTensor< T >::scale(), and madness::GenTensor< T >::size().
|
inline |
References madness::GenTensor< T >::ptr().
|
inlineconstexpr |
Referenced by madness::GenTensor< T >::add_SVD(), madness::convert(), madness::GenTensor< T >::convert(), madness::GenTensor< T >::convert_inplace(), madness::FunctionImpl< T, NDIM >::do_apply_kernel2(), madness::GenTensor< T >::emul(), madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), madness::GenTensor< T >::full_tensor_copy(), madness::SliceLowRankTensor< T >::gaxpy(), madness::GenTensor< T >::gaxpy(), madness::FunctionImpl< T, NDIM >::multiply(), madness::GenTensor< T >::nCoeff(), madness::GenTensor< T >::operator GenTensor< Q >(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::GenTensor< T >::operator=(), madness::SliceLowRankTensor< T >::operator=(), madness::outer(), madness::FunctionImpl< T, NDIM >::partial_inner_contract(), madness::GenTensor< T >::rank(), madness::GenTensor< T >::real_size(), madness::GenTensor< T >::reconstruct_tensor(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::screen(), madness::GenTensor< T >::TENSOR_RESULT_TYPE(), and madness::GenTensor< T >::what_am_i().
|
inlineconstexpr |
References madness::GenTensor< T >::index().
|
inline |
|
inline |
References madness::GenTensor< T >::index(), madness::TT_2D, madness::TT_FULL, and madness::TT_TENSORTRAIN.
|
inlineconstexpr |
Referenced by madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::pointwise_multiplier(), madness::GenTensor< T >::add_SVD(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::convert(), madness::GenTensor< T >::convert_inplace(), madness::FunctionImpl< T, NDIM >::do_apply_kernel2(), madness::GenTensor< T >::emul(), madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), madness::GenTensor< T >::full_tensor_copy(), madness::SliceLowRankTensor< T >::gaxpy(), madness::GenTensor< T >::gaxpy(), madness::FunctionImpl< T, NDIM >::multiply(), madness::GenTensor< T >::nCoeff(), madness::GenTensor< T >::normalize(), madness::GenTensor< T >::operator GenTensor< Q >(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::GenTensor< T >::operator=(), madness::SliceLowRankTensor< T >::operator=(), madness::FunctionImpl< T, NDIM >::partial_inner_contract(), madness::GenTensor< T >::rank(), madness::GenTensor< T >::real_size(), madness::GenTensor< T >::reconstruct_tensor(), madness::GenTensor< T >::reduce_rank(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::screen(), madness::GenTensor< T >::svd_normf(), madness::GenTensor< T >::TENSOR_RESULT_TYPE(), and madness::GenTensor< T >::what_am_i().
|
inlineconstexpr |
References madness::GenTensor< T >::index().
|
inlineconstexpr |
Referenced by madness::GenTensor< T >::add_SVD(), madness::convert(), madness::GenTensor< T >::convert_inplace(), madness::GenTensor< T >::emul(), madness::GenTensor< T >::full_tensor_copy(), madness::SliceLowRankTensor< T >::gaxpy(), madness::GenTensor< T >::gaxpy(), madness::GenTensor< T >::nCoeff(), madness::GenTensor< T >::operator GenTensor< Q >(), madness::GenTensor< T >::operator=(), madness::SliceLowRankTensor< T >::operator=(), madness::outer(), madness::GenTensor< T >::rank(), madness::GenTensor< T >::real_size(), madness::GenTensor< T >::reconstruct_tensor(), madness::GenTensor< T >::reduce_rank(), madness::GenTensor< T >::TENSOR_RESULT_TYPE(), and madness::GenTensor< T >::what_am_i().
|
inlineconstexpr |
References madness::GenTensor< T >::index().
|
inline |
References madness::GenTensor< T >::size().
Referenced by madness::FunctionImpl< T, NDIM >::nCoeff().
|
inline |
References madness::GenTensor< T >::get_svdtensor(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), MADNESS_EXCEPTION, and madness::GenTensor< T >::size().
|
inline |
References madness::GenTensor< T >::is_assigned(), madness::BaseTensor::ndim(), and madness::GenTensor< T >::ptr().
Referenced by madness::GenTensor< T >::GenTensor(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::FunctionImpl< T, NDIM >::assemble_coefficients(), madness::FunctionNode< T, NDIM >::coeff(), madness::GenTensor< T >::convert_inplace(), madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), madness::outer(), and madness::SeparatedConvolution< Q, NDIM >::partial_upsample().
|
inline |
|
inline |
|
inline |
References madness::detail::norm(), and madness::GenTensor< T >::tensor.
Referenced by madness::Leaf_op< T, NDIM, opT, specialboxT >::compare_to_parent(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::FunctionImpl< T, NDIM >::do_apply_directed_screening(), madness::FunctionImpl< R, NDIM >::eval_plot_cube(), madness::FunctionImpl< T, NDIM >::norm_tree_spawn(), madness::op_leaf_op< T, NDIM, opT >::operator()(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_norm2sq_local::operator()(), madness::FunctionImpl< T, NDIM >::do_check_symmetry_local::operator()(), madness::operator<<(), madness::Leaf_op< T, NDIM, opT, specialboxT >::post_screening(), madness::FunctionNode< T, NDIM >::print_json(), madness::FunctionNode< T, NDIM >::recompute_snorm_and_dnorm(), madness::GenTensor< T >::svd_normf(), madness::FunctionImpl< T, NDIM >::tnorm(), madness::FunctionImpl< T, NDIM >::truncate_op(), madness::FunctionImpl< T, NDIM >::truncate_spawn(), and madness::FunctionImpl< T, NDIM >::vtransform_doit().
|
inline |
Type conversion makes a deep copy.
References madness::BaseTensor::_dim, madness::BaseTensor::_ndim, BINARY_OPTIMIZED_ITERATOR, Q(), and T().
|
inline |
Type conversion makes a deep copy.
References madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), and MADNESS_EXCEPTION.
|
inline |
general slicing, shallow; for temporary use only!
References madness::GenTensor< T >::SliceLowRankTensor< T >.
|
inline |
general slicing, shallow; for temporary use only!
References madness::GenTensor< T >::SliceLowRankTensor< T >.
|
inline |
multiply with a number
References madness::GenTensor< T >::copy, Q(), madness::GenTensor< T >::scale(), T(), and madness::GenTensor< T >::TENSOR_RESULT_TYPE().
|
inline |
References madness::GenTensor< T >::copy, and madness::GenTensor< T >::gaxpy().
|
inline |
|
inline |
References madness::GenTensor< T >::gaxpy().
|
inline |
|
inline |
References madness::GenTensor< T >::copy, and madness::GenTensor< T >::gaxpy().
|
inline |
References madness::GenTensor< T >::gaxpy().
|
inline |
|
inline |
shallow assignment operator
References madness::GenTensor< T >::tensor.
|
inline |
deep assignment with slices: g0 = g1(s)
References madness::GenTensor< T >::copy, madness::GenTensor< T >::get_svdtensor(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::is_assigned(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), MADNESS_ASSERT, MADNESS_EXCEPTION, madness::GenTensor< T >::tensor, and madness::SliceLowRankTensor< T >::thisslice.
|
inline |
deep assignment operator
References madness::GenTensor< T >::copy, and madness::GenTensor< T >::tensor.
|
inline |
assign a number to this tensor
References madness::GenTensor< T >::tensor.
|
inline |
deep assignment operator
References madness::GenTensor< T >::copy, and madness::GenTensor< T >::tensor.
|
inline |
deep assignment operator
References madness::GenTensor< T >::copy, and madness::GenTensor< T >::tensor.
|
inline |
might return a NULL pointer!
References p(), and madness::GenTensor< T >::tensor.
Referenced by madness::SeparatedConvolution< Q, NDIM >::apply_transformation2(), madness::GenTensor< T >::dim(), madness::GenTensor< T >::dims(), madness::GenTensor< T >::is_assigned(), madness::GenTensor< T >::ndim(), and madness::GenTensor< T >::size().
|
inline |
Referenced by madness::FunctionNode< T, NDIM >::accumulate(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::FunctionImpl< T, NDIM >::apply_source_driven(), madness::GenTensor< T >::convert_inplace(), madness::FunctionImpl< T, NDIM >::dirac_convolution_op(), madness::FunctionImpl< T, NDIM >::do_project_out(), madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), madness::FunctionImpl< T, NDIM >::evalR(), madness::SliceLowRankTensor< T >::gaxpy(), LBCost::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::operator<<(), madness::SeparatedConvolution< Q, NDIM >::partial_upsample(), madness::FunctionNode< T, NDIM >::print_json(), madness::FunctionImpl< T, NDIM >::print_plane_local(), madness::FunctionImpl< T, NDIM >::print_stats(), and madness::GenTensor< T >::TENSOR_RESULT_TYPE().
|
inline |
|
inline |
References madness::GenTensor< T >::size().
Referenced by madness::FunctionImpl< T, NDIM >::real_size().
|
inline |
References madness::GenTensor< T >::get_svdtensor(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), MADNESS_EXCEPTION, and madness::GenTensor< T >::size().
|
inline |
|
inline |
reconstruct this to return a full tensor
References madness::GenTensor< T >::full_tensor(), madness::GenTensor< T >::full_tensor_copy(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_svd_tensor(), and madness::GenTensor< T >::is_tensortrain().
|
inline |
Referenced by madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::FunctionImpl< T, NDIM >::assemble_coefficients(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), madness::FunctionImpl< T, NDIM >::add_op::operator()(), madness::FunctionImpl< T, NDIM >::partial_inner_contract(), madness::FunctionImpl< T, NDIM >::reconstruct_op(), madness::FunctionNode< T, NDIM >::reduceRank(), madness::FunctionImpl< T, NDIM >::refine_op(), test_addition(), and test_reduce_rank().
|
inline |
|
inline |
Inplace multiplication by scalar of supported type (legacy name)
[in] | x | Scalar value |
References madness::GenTensor< T >::is_assigned(), T(), and madness::GenTensor< T >::tensor.
Referenced by madness::SeparatedConvolution< Q, NDIM >::apply_transformation2(), madness::Leaf_op< T, NDIM, opT, specialboxT >::compare_to_parent(), madness::FunctionNode< T, NDIM >::gaxpy_inplace(), madness::detail::scaleinplace< T, NDIM >::operator()(), madness::GenTensor< T >::operator*(), madness::FunctionImpl< T, NDIM >::parent_to_child(), and madness::FunctionNode< T, NDIM >::scale().
|
inline |
References madness::GenTensor< T >::is_assigned(), madness::GenTensor< T >::ptr(), and madness::BaseTensor::size().
Referenced by madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), madness::GenTensor< T >::has_data(), madness::GenTensor< T >::is_assigned(), madness::GenTensor< T >::nCoeff(), madness::LBCost::operator()(), madness::GenTensor< T >::real_size(), and madness::FunctionNode< T, NDIM >::size().
|
inline |
References madness::GenTensor< T >::normf().
Referenced by madness::FunctionImpl< T, NDIM >::do_apply_kernel3().
|
inline |
|
inline |
returns the trace of <this|rhs>
References madness::GenTensor< T >::get_svdtensor(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_same_tensor_type, madness::GenTensor< T >::is_svd_tensor(), madness::GenTensor< T >::is_tensortrain(), MADNESS_ASSERT, MADNESS_EXCEPTION, Q(), madness::GenTensor< T >::rank(), T(), and madness::Tensor< T >::trace().
Referenced by madness::GenTensor< T >::operator*().
|
inline |
|
inline |
return the tensor type
References madness::GenTensor< T >::index(), MADNESS_EXCEPTION, madness::TT_2D, madness::TT_FULL, and madness::TT_TENSORTRAIN.
|
inline |
|
inline |
deep copy
Referenced by madness::GenTensor< T >::GenTensor(), madness::GenTensor< T >::convert(), madness::GenTensor< T >::convert_inplace(), madness::GenTensor< T >::full_tensor_copy(), madness::GenTensor< T >::operator*(), madness::GenTensor< T >::operator+(), madness::GenTensor< T >::operator-(), and madness::GenTensor< T >::operator=().
|
friend |
Referenced by madness::GenTensor< T >::operator()().
|
private |
holding the implementation of the low rank tensor representations
Referenced by madness::GenTensor< T >::GenTensor(), madness::GenTensor< T >::get_svdtensor(), madness::GenTensor< T >::get_tensor(), madness::GenTensor< T >::get_tensortrain(), madness::GenTensor< T >::index(), madness::GenTensor< T >::normf(), madness::GenTensor< T >::operator=(), madness::GenTensor< T >::ptr(), madness::GenTensor< T >::scale(), and madness::GenTensor< T >::svd_normf().