MADNESS
version 0.9
|
#include <srconf.h>
Public Types | |
typedef Tensor< T > | tensorT |
Public Member Functions | |
SRConf () | |
default ctor More... | |
SRConf (const unsigned int &dim, const unsigned int &k, const TensorType &tt) | |
ctor with dimensions for a vector configuration (tested) More... | |
SRConf (const SRConf &rhs) | |
copy ctor (tested); shallow copy More... | |
SRConf (const Tensor< double > &weights, const std::vector< Tensor< T > > &vectors, const unsigned int &dim, const unsigned int maxk, const TensorType &tt) | |
ctor with provided weights and effective vectors; shallow copy More... | |
SRConf (const tensorT &vector1) | |
explicit ctor with one vector (aka full representation), shallow More... | |
SRConf (const Tensor< double > &weights, const tensorT &vector1, const tensorT &vector2, const unsigned int &dim, const unsigned int maxk) | |
explicit ctor with two vectors (aka SVD), shallow More... | |
SRConf & | operator= (const SRConf &rhs) |
assignment operator (tested), shallow copy of vectors More... | |
const SRConf | get_configs (const int &start, const int &end) const |
~SRConf () | |
dtor More... | |
template<typename Archive > | |
void | serialize (Archive &ar) |
TensorType | type () const |
return the tensor type More... | |
bool | has_data () const |
does this have any data? More... | |
void | orthonormalize (const double &thresh) |
orthonormalize this 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... | |
bool | has_structure () const |
return if this has a tensor structure (has not been flattened) More... | |
int | dim_per_vector () const |
return the number of physical dimensions More... | |
double | weights (const unsigned int &i) const |
return the weight More... | |
Static Public Member Functions | |
static int | max_sigma (const double &thresh, const int &rank, const Tensor< double > &w) |
Public Attributes | |
unsigned int | dim_ |
the number of dimensions (the order of the tensor) More... | |
Tensor< typename Tensor< T > ::scalar_type > | weights_ |
for each configuration the weight; length should be r More... | |
std::vector< tensorT > | vector_ |
long | rank_ |
what is the rank of this More... | |
unsigned int | maxk_ |
std::vector< Slice > | s_ |
TensorType | tensortype_ |
how will this be represented More... | |
Static Public Attributes | |
static const bool | check_orthonormality =false |
check orthonormality at low rank additions More... | |
Friends | |
class | GenTensor< T > |
SRConf< T > | copy (const SRConf< T > &rhs) |
deep copy of rhs, shrink More... | |
const SRConf< Q > &lhs | if ((lhs.has_no_data()) or(rhs.has_no_data())) return 0.0 |
bool | compatible (const SRConf &lhs, const SRConf &rhs) |
check compatibility More... | |
A SRConf handles all the configurations in a Separated Representation.
typedef Tensor<T> madness::SRConf< T >::tensorT |
|
inline |
default ctor
|
inline |
ctor with dimensions for a vector configuration (tested)
References madness::SRConf< T >::has_structure(), and madness::TT_FULL.
|
inline |
copy ctor (tested); shallow copy
References madness::SRConf< T >::has_structure().
|
inline |
ctor with provided weights and effective vectors; shallow copy
References madness::SRConf< T >::has_structure(), and madness::SRConf< T >::weights().
|
inline |
explicit ctor with one vector (aka full representation), shallow
References madness::SRConf< T >::has_structure().
|
inline |
explicit ctor with two vectors (aka SVD), shallow
References madness::SRConf< T >::has_structure(), and madness::SRConf< T >::weights().
|
inline |
dtor
|
inline |
return the number of physical dimensions
References mpfr::dim().
|
inline |
return some of the terms of the SRConf (start,..,end), inclusively shallow copy
References mpfr::dim(), madness::SRConf< T >::has_structure(), MADNESS_EXCEPTION, madness::SRConf< T >::ref_vector(), madness::SRConf< T >::type(), and madness::SRConf< T >::weights_.
|
inline |
does this have any data?
References madness::TT_FULL.
|
inline |
return if this has a tensor structure (has not been flattened)
References mpfr::dim(), madness::TT_FULL, and madness::SRConf< T >::type().
Referenced by madness::SRConf< T >::get_configs(), madness::SRConf< T >::operator=(), madness::SRConf< T >::orthonormalize(), madness::SRConf< T >::serialize(), and madness::SRConf< T >::SRConf().
|
inlinestatic |
return the index of the last singular vector/value to meet the threshold (returns -1 if all meet threshold, i.e. || A ||_2 < threshold) given a matrix A in SVD form, truncate the singular values such that the accuracy threshold is still met.
[in] | thresh | the threshold eps: || A - A(truncated) || < eps |
[in] | rank | the number of singular values in w [in] w the weights/singular values of A |
Referenced by madness::SeparatedConvolution< T, NDIM >::apply2(), madness::TensorTrain< T >::decompose(), madness::SeparatedConvolution< T, NDIM >::estimate_costs(), madness::ortho3(), and madness::TensorTrain< T >::truncate().
|
inline |
assignment operator (tested), shallow copy of vectors
References madness::SRConf< T >::dim_, madness::SRConf< T >::has_structure(), madness::SRConf< T >::maxk_, madness::SRConf< T >::ref_vector(), madness::SRConf< T >::s_, madness::SRConf< T >::tensortype_, madness::TT_FULL, madness::SRConf< T >::type(), madness::SRConf< T >::vector_, and madness::SRConf< T >::weights_.
|
inline |
orthonormalize this
References madness::SRConf< T >::has_structure(), madness::normalize(), madness::ortho3(), std::swap(), madness::TT_FULL, madness::SRConf< T >::type(), madness::wall_time(), and madness::SRConf< T >::weights_.
|
inline |
return reference to one of the vectors F
Referenced by madness::SRConf< T >::get_configs(), and madness::SRConf< T >::operator=().
|
inline |
return reference to one of the vectors F
|
inline |
References madness::SRConf< T >::has_structure().
|
inline |
return the tensor type
References madness::SRConf< T >::tensortype_.
Referenced by madness::SRConf< T >::get_configs(), madness::SRConf< T >::has_structure(), madness::SRConf< T >::operator=(), and madness::SRConf< T >::orthonormalize().
|
inline |
return the weight
References madness::SRConf< T >::weights_.
Referenced by madness::ortho3(), and madness::SRConf< T >::SRConf().
check compatibility
deep copy of rhs, shrink
Referenced by madness::ortho5().
|
friend |
|
friend |
|
static |
check orthonormality at low rank additions
unsigned int madness::SRConf< T >::dim_ |
the number of dimensions (the order of the tensor)
Referenced by madness::SRConf< T >::operator=().
unsigned int madness::SRConf< T >::maxk_ |
the number of underlying basis functions the dimensions of vector_ will be vector_(rank,maxk), vector_(rank,maxk,maxk), etc
Referenced by madness::SRConf< T >::operator=().
long madness::SRConf< T >::rank_ |
what is the rank of this
std::vector<Slice> madness::SRConf< T >::s_ |
Slice containing the actual data in each vector, ignoring "empty" configurations; will maintain contiguity of the data.
Referenced by madness::SRConf< T >::operator=().
TensorType madness::SRConf< T >::tensortype_ |
how will this be represented
Referenced by madness::SRConf< T >::operator=(), and madness::SRConf< T >::type().
std::vector<tensorT> madness::SRConf< T >::vector_ |
for each (physical) dimension one Tensor of (logical) dimension (r,k) for vectors or (r,kprime,k) for operators
Referenced by madness::SRConf< T >::operator=().
Tensor< typename Tensor<T>::scalar_type > madness::SRConf< T >::weights_ |
for each configuration the weight; length should be r
Referenced by madness::SRConf< T >::get_configs(), madness::SRConf< T >::operator=(), madness::SRConf< T >::orthonormalize(), and madness::SRConf< T >::weights().