MiniTensor Version of the Day
Loading...
Searching...
No Matches
Matrix Functions

Tensor exponential, logarithm and square root families, integer powers, and the Baker-Campbell-Hausdorff series. More...

Functions

template<typename T , Index N>
Tensor< T, N > minitensor::exp (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::exp_taylor (Tensor< T, N > const &A)
 
template<typename T , Index N>
Tensor< T, N > minitensor::exp_pade (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::exp_sym (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::exp_eig_sym (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_taylor (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_gregory (Tensor< T, N > const &A)
 
template<typename T , Index N>
Tensor< T, N > minitensor::log_schur (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_sym (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_eig_sym (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::bch (Tensor< T, N > const &v, Tensor< T, N > const &r)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::binary_powering (Tensor< T, N > const &A, Index const exponent)
 
template<typename T >
KOKKOS_INLINE_FUNCTIONminitensor::scaling_squaring_theta_ah09 (Index const order)
 
template<Index N>
Index minitensor::expm_ell (Tensor< Real, N > const &A, Index const m)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::sqrt_dbp (Tensor< T, N > const &A, int &k)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::sqrt (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_pade_pf (Tensor< T, N > const &A, Index const n)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_iss (Tensor< T, N > const &A)
 
template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_pade (Tensor< T, N > const &A)
 

Detailed Description

Tensor exponential, logarithm and square root families, integer powers, and the Baker-Campbell-Hausdorff series.

Function Documentation

◆ exp()

template<typename T , Index N>
Tensor< T, N > minitensor::exp ( Tensor< T, N > const &  A)

Exponential map.

Returns
\( \exp A \)

Definition at line 145 of file MiniTensor_MatrixFunctions.h.

◆ exp_taylor()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::exp_taylor ( Tensor< T, N > const &  A)

Exponential map by Taylor series, radius of convergence is infinity

Returns
\( \exp A \)

Definition at line 157 of file MiniTensor_MatrixFunctions.h.

◆ exp_pade()

template<typename T , Index N>
Tensor< T, N > minitensor::exp_pade ( Tensor< T, N > const &  A)

Exponential map by squaring and scaling and Padé approximants. See algorithm 10.20 in Functions of Matrices, N.J. Higham, SIAM, 2008.

Returns
\( \exp A \)

Definition at line 3128 of file MiniTensor_MatrixFunctions.h.

◆ exp_sym()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::exp_sym ( Tensor< T, N > const &  A)

Exponential map for symmetric tensor

Returns
\( \exp A \)

Definition at line 4018 of file MiniTensor_MatrixFunctions.h.

◆ exp_eig_sym()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::exp_eig_sym ( Tensor< T, N > const &  A)

Exponential map for symmetric tensor using eigenvalue decomposition

Returns
\( \exp A \)

Definition at line 4029 of file MiniTensor_MatrixFunctions.h.

◆ log()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log ( Tensor< T, N > const &  A)

Logarithmic map.

Returns
\( \log A \)

Definition at line 3350 of file MiniTensor_MatrixFunctions.h.

◆ log_taylor()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_taylor ( Tensor< T, N > const &  A)

Logarithmic map by Taylor series, converges for \( |A-I| < 1 \)

Returns
\( \log A \)

Definition at line 3301 of file MiniTensor_MatrixFunctions.h.

◆ log_gregory()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_gregory ( Tensor< T, N > const &  A)

Logarithmic map by Gregory series, converges for \( \min_i \text{Re} \lambda_i(A) > 0 \)

Returns
\( \log A \)

Definition at line 3361 of file MiniTensor_MatrixFunctions.h.

◆ log_schur()

template<typename T , Index N>
Tensor< T, N > minitensor::log_schur ( Tensor< T, N > const &  A)

Logarithmic map by real Schur decomposition and inverse scaling and squaring on the quasi-triangular factor (Al-Mohy and Higham, 2012). Dimension 3 or less; used by log() for those dimensions.

Returns
\( \log A \)

Definition at line 3829 of file MiniTensor_MatrixFunctions.h.

◆ log_sym()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_sym ( Tensor< T, N > const &  A)

Logarithmic map for symmetric tensor.

Returns
\( \log A \)

Definition at line 3975 of file MiniTensor_MatrixFunctions.h.

◆ log_eig_sym()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_eig_sym ( Tensor< T, N > const &  A)

Logarithmic map for symmetric tensor using eigenvalue decomposition.

Returns
\( \log A \)

Definition at line 3986 of file MiniTensor_MatrixFunctions.h.

◆ bch()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::bch ( Tensor< T, N > const &  v,
Tensor< T, N > const &  r 
)

Logarithmic map using BCH expansion (4 terms)

Parameters
vtensor
rtensor
Returns
Baker-Campbell-Hausdorff series up to 4 terms

Definition at line 4061 of file MiniTensor_MatrixFunctions.h.

◆ binary_powering()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::binary_powering ( Tensor< T, N > const &  A,
Index const  exponent 
)

Non-negative integer power of a tensor by binary manipulation of the exponent, so that the number of multiplications is logarithmic in it.

Parameters
Atensor
exponentnon-negative integer exponent
Returns
\( A^{\text{exponent}} \), the identity if the exponent is zero

Definition at line 2969 of file MiniTensor_MatrixFunctions.h.

◆ scaling_squaring_theta_ah09()

template<typename T >
KOKKOS_INLINE_FUNCTION T minitensor::scaling_squaring_theta_ah09 ( Index const  order)

Pade truncation-order thresholds of Al-Mohy and Higham (2009).

Definition at line 3041 of file MiniTensor_MatrixFunctions.h.

◆ expm_ell()

template<Index N>
Index minitensor::expm_ell ( Tensor< Real, N > const &  A,
Index const  m 
)

Rounding-error correction term of Al-Mohy and Higham (2009), Eq. (5.1).

Definition at line 3063 of file MiniTensor_MatrixFunctions.h.

◆ sqrt_dbp()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::sqrt_dbp ( Tensor< T, N > const &  A,
int &  k 
)

Matrix square root by the product form of the Denman-Beavers iteration.

Parameters
Atensor
kon return, the number of iterations performed

Definition at line 3422 of file MiniTensor_MatrixFunctions.h.

◆ sqrt()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::sqrt ( Tensor< T, N > const &  A)

Matrix square root.

Definition at line 3468 of file MiniTensor_MatrixFunctions.h.

◆ log_pade_pf()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_pade_pf ( Tensor< T, N > const &  A,
Index const  n 
)

Matrix logarithm via partial-fraction Pade approximant of order n.

Definition at line 3481 of file MiniTensor_MatrixFunctions.h.

◆ log_iss()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_iss ( Tensor< T, N > const &  A)

Matrix logarithm by inverse scaling and squaring.

Definition at line 3502 of file MiniTensor_MatrixFunctions.h.

◆ log_pade()

template<typename T , Index N>
KOKKOS_INLINE_FUNCTION Tensor< T, N > minitensor::log_pade ( Tensor< T, N > const &  A)

Matrix logarithm by inverse scaling and squaring with Pade approximants.

Definition at line 3936 of file MiniTensor_MatrixFunctions.h.