<T>LAPACK 0.1.2
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
trevc_protect.hpp File Reference
Include dependency graph for trevc_protect.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  tlapack
 Sort the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D' ).
 

Functions

template<TLAPACK_SCALAR T, enable_if_t< is_real< T >, int > = 0>
void tlapack::trevc_2x2solve (T a, T b, T c, T d, T &x1, T &x2, T &scale, T sf_min, T sf_max)
 Robustly solve a 2x2 system of equations (a b) (x1) = scale * (rhs1) (c d) (x2) (rhs2)
 
template<TLAPACK_SCALAR T, enable_if_t< is_real< T >, int > = 0>
void tlapack::trevc_2x2solve (T ar, T ai, T br, T bi, T cr, T ci, T dr, T di, T &x1r, T &x1i, T &x2r, T &x2i, T &scale, T sf_min, T sf_max)
 Robustly solve a 2x2 system of equations (ar + i*ai br + i*bi) (x1r + i*x1i) = scale * (rhs1) (cr + i*ci dr + i*di) (x2r + i*x2i) (rhs2)
 
template<TLAPACK_MATRIX matrix_T_t, TLAPACK_VECTOR vector_colN_t>
void tlapack::trevc_colnorms (Norm norm, const matrix_T_t &T, vector_colN_t &colN)
 Calculate the 1- or infinity-norms of the columns of the strictly upper triangular part of T.
 
template<TLAPACK_SCALAR T, enable_if_t< is_complex< T >, int > = 0>
real_type< T > tlapack::trevc_protectdiv (T a, T b, real_type< T > sf_min, real_type< T > sf_max)
 Given two numbers a and b, calculate a scaling factor alpha in (0, 1] such that the division (a * alpha) / (b) cannot be larger than the threshold safe_max.
 
template<TLAPACK_SCALAR T, enable_if_t< is_real< T >, int > = 0>
tlapack::trevc_protectdiv (T a, T b, T sf_min, T sf_max)
 Given two numbers a and b, calculate a scaling factor alpha in (0, 1] such that the division (a * alpha) / (b) cannot be larger than the threshold safe_max.
 
template<TLAPACK_SCALAR T, enable_if_t< is_real< T >, int > = 0>
real_type< T > tlapack::trevc_protectdiv (T ar, T ai, T br, T bi, real_type< T > sf_min, real_type< T > sf_max)
 Given two numbers a and b, calculate a scaling factor alpha in (0, 1] such that the division (a * alpha) / (b) cannot be larger than the threshold safe_max.
 
template<TLAPACK_SCALAR T, enable_if_t< is_complex< T >, int > = 0>
real_type< T > tlapack::trevc_protectsum (T a, T b, real_type< T > sf_max)
 Calculate a scaling factor xi in [0.5, 1] such that the sum (xi * a) + (xi * b) does not overflow.
 
template<TLAPACK_SCALAR T, enable_if_t< is_real< T >, int > = 0>
tlapack::trevc_protectsum (T a, T b, T sf_max)
 Calculate a scaling factor xi in [0.5, 1] such that the sum (xi * a) + (xi * b) does not overflow.
 
template<TLAPACK_SCALAR T, enable_if_t< is_real< T >, int > = 0>
tlapack::trevc_protectupdate (T ynorm, T tnorm, T xnorm, T sf_max)
 Given the infinity norms of the matrices Y, T, and X, calculate a scaling factor scale in (0, 1] such that the update Z = scale*Y - T * (scale * X) does not overflow.
 

Detailed Description

Author
Thijs Steel, KU Leuven, Belgium