SyTen
dense_stability.h File Reference

Functions to improve the stability of numerical algorithms working on dense tensors. More...

#include "inc/dense/dense.h"
+ Include dependency graph for dense_stability.h:

Namespaces

 syten
 Syten namespace.
 

Functions

template<Rank rank, typename Scalar >
void syten::prune_small_reim (DenseTensor< rank, Scalar > &)
 Removes real or imaginary parts if they are much smaller than the other one. More...
 
template<Rank rank, typename Scalar >
void syten::prune_small_reim (DenseTensor< rank, std::complex< Scalar > > &a)
 Removes real or imaginary parts if they are much smaller than the other one. More...
 
template<typename Scalar >
void syten::prune_small_rows (DenseTensor< 2, Scalar > &a)
 Removes elements small relative to the other elements of the row. More...
 
template<typename Scalar >
void syten::regularise_abs (Scalar *first, Scalar *last, typename ScalarBase< typename IdentityType< Scalar >::type >::type threshold)
 Changes the absolute value of entries with very similar absolute values to the median of those. More...
 
template<typename ScalarBase >
void syten::regularise_imag (std::complex< ScalarBase > *first, std::complex< ScalarBase > *last, ScalarBase threshold)
 Changes the imaginary part of entries with very similar absolute imaginary parts to the median of those. More...
 
template<typename ScalarBase >
void syten::regularise_real (std::complex< ScalarBase > *first, std::complex< ScalarBase > *last, ScalarBase threshold)
 Changes the real part of entries with very similar absolute real parts to the median of those. More...
 
template<typename Scalar >
void syten::scale_columns_2norm (DenseTensor< 2, Scalar > &a, DenseTensor< 2, Scalar > &s)
 Scales the columns of a in-place to have 2-norm close to one. More...
 
template<typename Scalar >
void syten::sort_cols_sparsity (DenseTensor< 2, Scalar > &a, DenseTensor< 2, Scalar > &p)
 Sorts the columns of a in-place to have the sparsest columns first. More...
 
template<typename Scalar >
void syten::sort_rows_infnorm (DenseTensor< 2, Scalar > &a, DenseTensor< 2, Scalar > &p)
 Sorts the rows of a in-place such that the row with the largest absolute value comes first, then the row with the second-largest absolute value etc. More...
 

Detailed Description

Functions to improve the stability of numerical algorithms working on dense tensors.