|
| SVDTensor () |
|
| SVDTensor (const long ndims, const long *dims) |
|
| SVDTensor (const SRConf< T > &rhs) |
|
| SVDTensor (const std::vector< long > &dims) |
|
| SVDTensor (const SVDTensor< T > &rhs)=default |
|
| SVDTensor (const Tensor< double > &weights, const Tensor< T > &vector1, const Tensor< T > &vector2, const long &ndim, const long *dims) |
|
| SVDTensor (const Tensor< T > &rhs, const double eps) |
|
void | divide_and_conquer_reduce (const double &thresh) |
| reduce the rank using a divide-and-conquer approach More...
|
|
SVDTensor< T > & | emul (const SVDTensor< T > &other) |
|
SVDTensor< T > & | gaxpy (T alpha, const SVDTensor< T > &rhs, T beta) |
|
long | nCoeff () const |
|
SVDTensor & | operator= (const T &number) |
|
void | orthonormalize (const double &thresh) |
|
void | orthonormalize_random (const double &thresh) |
|
long | rank () const |
|
void | recompute_from_range (const Tensor< T > &range) |
| compute an SVD from a given matrix and its range More...
|
|
void | truncate_svd (const double &thresh) |
|
| SRConf () |
| default ctor More...
|
|
| SRConf (const long &ndim, const long *dimensions, const long nci) |
|
| SRConf (const long &ndim, const std::array< long, TENSOR_MAXDIM > &dimensions, const long nci) |
|
| SRConf (const SRConf &rhs)=default |
| copy ctor (tested); shallow copy More...
|
|
| SRConf (const Tensor< double > &weights, const std::vector< Tensor< T > > &vectors, const long &ndim, const long &dims, const long nci) |
| ctor with provided weights and effective vectors; shallow copy More...
|
|
| SRConf (const Tensor< double > &weights, const tensorT &vector1, const tensorT &vector2, const long &ndim, const long *dims, const long nci) |
| explicit ctor with two vectors (aka SVD), shallow More...
|
|
| ~SRConf () |
| dtor More...
|
|
void | add_SVD (const SRConf< T > &rhs, const double &thresh) |
| add two orthonormal configurations, yielding an optimal SVD decomposition More...
|
|
void | append (const SRConf< T > &rhs, const double fac=1.0) |
| append configurations of rhs to this More...
|
|
void | append (const SRConf< T > &rhs, const double_complex fac=1.0) |
|
const std::vector< Slice > & | c0 (const int idim) const |
| return a Slice that corresponds the that part of vector_ that holds coefficients More...
|
|
void | clear () |
|
SRConf< T > | copy_slice (const std::array< Slice, TENSOR_MAXDIM > &s) const |
| return a slice of this (deep copy) More...
|
|
int | dim_per_vector (int idim) const |
| return the number of physical dimensions More...
|
|
SRConf< T > & | emul (const SRConf< T > &other) |
| perform elementwise Hadamard product More...
|
|
Tensor< T > | flat_vector (const unsigned int &idim) |
| return shallow copy of a slice of one of the vectors, flattened to (r,kVec) More...
|
|
const Tensor< T > | flat_vector (const unsigned int &idim) const |
| return shallow copy of a slice of one of the vectors, flattened to (r,kVec) More...
|
|
Tensor< T > | flat_vector_with_weights (const int dim) const |
| return flat (r,i) view of the tensor with the weights multiplied in More...
|
|
template<typename Q > |
SRConf< TENSOR_RESULT_TYPE(T, Q) > | general_transform (const Tensor< Q > c[]) const |
|
const SRConf | get_configs (const int &start, const int &end) const |
|
bool | has_data () const |
| does this have any data? More...
|
|
bool | has_no_data () const |
| does this have any data? More...
|
|
bool | has_structure () const |
| return if this has a tensor structure (has not been flattened) More...
|
|
long | kVec (const int idim) const |
|
void | make_empty_vectors_and_weights (const long rank) |
|
std::array< std::array< long, TENSOR_MAXDIM >, 2 > | make_vector_dimensions (const long rank) const |
| deduce the dimensions of the left and right singular vectors from the tensor dimensions More...
|
|
Tensor< T > | make_vector_with_weights (const int dim) const |
|
SRConf & | operator= (const SRConf &rhs) |
| assignment operator (tested), shallow copy of vectors More...
|
|
SRConf & | operator= (const T &number) |
| assign a number to this; More...
|
|
long | rank () const |
| return the logicalrank More...
|
|
Tensor< T > | reconstruct () const |
| reconstruct this to return a full tensor More...
|
|
Tensor< T > & | ref_vector (const unsigned int &idim) |
| return reference to one of the vectors F More...
|
|
const Tensor< T > & | ref_vector (const unsigned int &idim) const |
| return reference to one of the vectors F More...
|
|
template<typename Archive > |
void | serialize (Archive &ar) |
|
void | set_size_and_dim (long ndim, long k) |
|
void | set_vectors_and_weights (const Tensor< typename Tensor< T >::scalar_type > &weights, const Tensor< T > &vector1, const Tensor< T > &vector2) |
|
SRConf< T > | transform_dir (const Tensor< T > &c, const int &axis) const |
|
double | weights (const unsigned int &i) const |
| return the weight More...
|
|
| 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...
|
|
|
typedef Tensor< T > | tensorT |
|
long | nci_left =-1 |
| separation dimensions: A(n,m) -> A(r,n) B(r,m), with n={k1,k2},m={k3,k4,k5..) multi-indices More...
|
|
std::vector< Slice > | s0 |
|
std::vector< Slice > | s1 |
|
std::array< Tensor< T >, 2 > | vector_ |
|
Tensor< typename Tensor< T >::scalar_type > | weights_ |
| for each configuration the weight; length should be r More...
|
|
static const bool | check_orthonormality =false |
| check orthonormality at low rank additions More...
|
|
bool | check_dimensions () const |
|
bool | check_right_orthonormality () const |
| check if the terms are orthogonal More...
|
|
void | fillWithRandom (const long &rank=1) |
| fill this SRConf with 1 flattened random configurations (tested) More...
|
|
void | inplace_add (const SRConf< T > &rhs, std::array< Slice, TENSOR_MAXDIM > lhs_s, std::array< Slice, TENSOR_MAXDIM > rhs_s, const double alpha, const double beta) |
| alpha * this(lhs_s) + beta * rhs(rhs_s) More...
|
|
bool | is_flat () const |
| return if this has only one additional dimension (apart from rank) More...
|
|
Tensor< T > | make_left_vector_with_weights () const |
|
void | make_slices () |
| redo the Slices for getting direct access to the configurations More...
|
|
std::array< std::vector< Slice >, 2 > | make_slices (const std::array< Slice, TENSOR_MAXDIM > &s) const |
|
void | make_structure (bool force=false) |
|
unsigned int | nCoeff () const |
| return the number of coefficients More...
|
|
void | normalize () |
| normalize the vectors (tested) More...
|
|
TensorTypeData< T >::float_scalar_type | normf () const |
| calculate the Frobenius norm More...
|
|
size_t | real_size () const |
| return the real size of this More...
|
|
void | scale (const double &fac) |
| scale this by a number More...
|
|
void | scale (const double_complex &fac) |
|
TensorTypeData< T >::float_scalar_type | svd_normf () const |
| calculate the Frobenius norm, if this is in SVD form More...
|
|
template<typename Q > |
std::enable_if<(TensorTypeData< T >::iscomplex or TensorTypeData< Q >::iscomplex), TENSOR_RESULT_TYPE(T, Q)>::type friend | trace (const SRConf< T > &rhs, const SRConf< Q > &lhs) |
|
template<typename Q > |
std::enable_if<!(TensorTypeData< T >::iscomplex or TensorTypeData< Q >::iscomplex), TENSOR_RESULT_TYPE(T, Q)>::type friend | trace (const SRConf< T > &rhs, const SRConf< Q > &lhs) |
| calculate the Frobenius inner product (tested) More...
|
|
SRConf< T > | transform (const Tensor< T > &c) const |
|
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...
|
|
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...
|
|