SyTen
dense_decomposition_dlin.h File Reference

Delinearisation of dense tensors. More...

+ Include dependency graph for dense_decomposition_dlin.h:
+ This graph shows which files directly or indirectly include this file:

Namespaces

 syten
 Syten namespace.
 
 syten::Delinearise
 Delinearisation decomposition.
 

Macros

#define SYTEN_DELINEARISE_THRESHOLD   (1e-12)
 Threshold for delinearisation. More...
 

Functions

template<typename Scalar >
std::vector< std::pair< Index, int > > syten::Delinearise::calculate_scores (std::vector< DenseTensor< 1, Scalar > > const &columns, std::vector< DenseTensor< 1, Scalar > > const &thresh)
 Calculates the zeroness score of all columns comparing against all others. More...
 
template<typename Scalar >
void syten::Delinearise::cols (DenseTensor< 2, Scalar > const &a, DenseTensor< 2, Scalar > &p, DenseTensor< 2, Scalar > &t, DenseTensor< 2, typename ScalarBase< Scalar >::type > const &thresholds_in=DenseTensor< 2, typename ScalarBase< Scalar >::type >(), bool const relax_if_necessary=false)
 Calculates \( p \), \( t \) s.t. \( p·t = a \) and \( p \) has as few columns as possible. More...
 
template<typename Scalar >
DenseTensor< 2, typename ScalarBase< Scalar >::type > syten::Delinearise::cols_only (DenseTensor< 2, Scalar > const &a, DenseTensor< 2, Scalar > &p, DenseTensor< 2, Scalar > &t, DenseTensor< 2, typename ScalarBase< Scalar >::type > const &thresholds)
 De-linearises the columns of a matrix based on the provided thresholds. More...
 
template<typename Scalar >
bool syten::Delinearise::compare_residual (DenseTensor< 1, Scalar > const &original, DenseTensor< 1, Scalar > const &calculated, DenseTensor< 1, Scalar > const &threshold, SRDef factor)
 Returns true if original[i] ~ calculated[i] to within threshold[i] * factor. More...
 
template<typename Scalar >
std::vector< Index > syten::Delinearise::count_all_zeros (std::vector< DenseTensor< 1, Scalar > > const &vec)
 Counts the number of exactly-zero entries of each element of vec. More...
 
template<typename Scalar >
std::vector< Index > syten::Delinearise::count_bottom_zeros (std::vector< DenseTensor< 1, Scalar > > const &vec)
 Counts the number of zeros from the bottom in each entry of vec. More...
 
template<typename Scalar >
DenseTensor< 2, Scalar > syten::Delinearise::permute (std::vector< DenseTensor< 1, Scalar > > &columns, std::vector< DenseTensor< 1, Scalar > > &thresh)
 Permutes columns in columns and thresh such that the columns with maximal zeroness score are in the front. More...
 
template<typename Scalar >
void syten::Delinearise::postprocess_coefficient (Scalar &c, Index num_entries)
 Shifts coefficients to 0, 1 and -1. More...
 
template<typename Scalar >
void syten::Delinearise::rows (DenseTensor< 2, Scalar > const &a, DenseTensor< 2, Scalar > &t, DenseTensor< 2, Scalar > &p, DenseTensor< 2, typename ScalarBase< Scalar >::type > const &thresholds=DenseTensor< 2, typename ScalarBase< Scalar >::type >(), bool const relax_if_necessary=false)
 Calculates \( p \), \( t \) s.t. \( t·p = a \) and \( p \) has as few rows as possible. More...
 

Detailed Description

Delinearisation of dense tensors.