|
| 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
|
|
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
|
|
void | truncate_svd (const double &thresh) |
|
| SRConf () |
| default ctor
|
|
| 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
|
|
| 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
|
|
| 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
|
|
| ~SRConf () |
| dtor
|
|
void | add_SVD (const SRConf< T > &rhs, const double &thresh) |
| add two orthonormal configurations, yielding an optimal SVD decomposition
|
|
void | append (const SRConf< T > &rhs, const double fac=1.0) |
| append configurations of rhs to this
|
|
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
|
|
void | clear () |
|
SRConf< T > | copy_slice (const std::array< Slice, TENSOR_MAXDIM > &s) const |
| return a slice of this (deep copy)
|
|
int | dim_per_vector (int idim) const |
| return the number of physical dimensions
|
|
SRConf< T > & | emul (const SRConf< T > &other) |
| perform elementwise Hadamard product
|
|
Tensor< T > | flat_vector (const unsigned int &idim) |
| return shallow copy of a slice of one of the vectors, flattened to (r,kVec)
|
|
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)
|
|
Tensor< T > | flat_vector_with_weights (const int dim) const |
| return flat (r,i) view of the tensor with the weights multiplied in
|
|
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?
|
|
bool | has_no_data () const |
| does this have any data?
|
|
bool | has_structure () const |
| return if this has a tensor structure (has not been flattened)
|
|
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
|
|
Tensor< T > | make_vector_with_weights (const int dim) const |
|
SRConf & | operator= (const SRConf &rhs) |
| assignment operator (tested), shallow copy of vectors
|
|
SRConf & | operator= (const T &number) |
| assign a number to this;
|
|
long | rank () const |
| return the logicalrank
|
|
Tensor< T > | reconstruct () const |
| reconstruct this to return a full tensor
|
|
Tensor< T > & | ref_vector (const unsigned int &idim) |
| return reference to one of the vectors F
|
|
const Tensor< T > & | ref_vector (const unsigned int &idim) const |
| return reference to one of the vectors F
|
|
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
|
|
| BaseTensor () |
|
virtual | ~BaseTensor () |
|
bool | conforms (const BaseTensor *t) const |
| Returns true if this and *t are the same shape and size.
|
|
long | dim (int i) const |
| Returns the size of dimension i .
|
|
const long * | dims () const |
| Returns the array of tensor dimensions.
|
|
long | id () const |
| Returns the typeid of the tensor (c.f., TensorTypeData<T> )
|
|
bool | iscontiguous () const |
| Returns true if the tensor refers to contiguous memory locations.
|
|
long | ndim () const |
| Returns the number of dimensions in the tensor.
|
|
long | size () const |
| Returns the number of elements in the tensor.
|
|
long | stride (int i) const |
| Returns the stride associated with dimension i .
|
|
const long * | strides () const |
| Returns the array of tensor strides.
|
|
|
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
|
|
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
|
|
static const bool | check_orthonormality =false |
| check orthonormality at low rank additions
|
|
bool | check_dimensions () const |
|
bool | check_right_orthonormality () const |
| check if the terms are orthogonal
|
|
void | fillWithRandom (const long &rank=1) |
| fill this SRConf with 1 flattened random configurations (tested)
|
|
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)
|
|
bool | is_flat () const |
| return if this has only one additional dimension (apart from rank)
|
|
Tensor< T > | make_left_vector_with_weights () const |
|
void | make_slices () |
| redo the Slices for getting direct access to the configurations
|
|
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
|
|
void | normalize () |
| normalize the vectors (tested)
|
|
TensorTypeData< T >::float_scalar_type | normf () const |
| calculate the Frobenius norm
|
|
size_t | real_size () const |
| return the real size of this
|
|
void | scale (const double &fac) |
| scale this by a number
|
|
void | scale (const double_complex &fac) |
|
TensorTypeData< T >::float_scalar_type | svd_normf () const |
| calculate the Frobenius norm, if this is in SVD form
|
|
template<typename Q > |
std::enable_if<(TensorTypeData< T >::iscomplexorTensorTypeData< 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 >::iscomplexorTensorTypeData< Q >::iscomplex), TENSOR_RESULT_TYPE(T, Q)>::type friend | trace (const SRConf< T > &rhs, const SRConf< Q > &lhs) |
| calculate the Frobenius inner product (tested)
|
|
SRConf< T > | transform (const Tensor< T > &c) const |
|
void | cycledim_inplace (long shift, long start, long end) |
| Cyclic shift of dimensions.
|
|
void | flat_inplace () |
| Reshapes the tensor inplace into 1D.
|
|
void | fusedim_inplace (long i) |
| Fuses dimensions i and i+1 .
|
|
void | mapdim_inplace (const std::vector< long > &map) |
| General permutation of dimensions.
|
|
void | reshape_inplace (const std::vector< long > &d) |
| Reshapes the tensor inplace.
|
|
void | reshape_inplace (int ndimnew, const long *d) |
| Reshapes the tensor inplace.
|
|
void | set_dims_and_size (long nd, const long d[]) |
|
void | splitdim_inplace (long i, long dimi0, long dimi1) |
| Splits dimension i .
|
|
void | swapdim_inplace (long i, long j) |
| Swaps the dimensions.
|
|
long | _dim [TENSOR_MAXDIM] |
| Size of each dimension.
|
|
long | _id |
| Id from TensorTypeData<T> in type_data.h.
|
|
long | _ndim |
| Number of dimensions (-1=invalid; 0=no supported; >0=tensor)
|
|
long | _size |
| Number of elements in the tensor.
|
|
long | _stride [TENSOR_MAXDIM] |
| Increment between elements in each dimension.
|
|