Eigen::internal::MatrixLogarithmAtomic< MatrixType > Class Template Reference

Helper class for computing matrix logarithm of atomic matrices. More...

#include <MatrixLogarithm.h>

Public Member Functions

MatrixType compute (const MatrixType &A)
 Compute matrix logarithm of atomic matrix. More...
 

Detailed Description

template<typename MatrixType>
class Eigen::internal::MatrixLogarithmAtomic< MatrixType >

Helper class for computing matrix logarithm of atomic matrices.

Here, an atomic matrix is a triangular matrix whose diagonal entries are close to each other.

See also
class MatrixFunctionAtomic, MatrixBase::log()

Member Function Documentation

◆ compute()

template<typename MatrixType >
MatrixType Eigen::internal::MatrixLogarithmAtomic< MatrixType >::compute ( const MatrixType A)

Compute matrix logarithm of atomic matrix.

Parameters
[in]Aargument of matrix logarithm, should be upper triangular and atomic
Returns
The logarithm of A.
282  {
283  using std::log;
284  MatrixType result(A.rows(), A.rows());
285  if (A.rows() == 1)
286  result(0, 0) = log(A(0, 0));
287  else if (A.rows() == 2)
288  matrix_log_compute_2x2(A, result);
289  else
290  matrix_log_compute_big(A, result);
291  return result;
292 }
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 log(const bfloat16 &a)
Definition: BFloat16.h:618
void matrix_log_compute_2x2(const MatrixType &A, MatrixType &result)
Compute logarithm of 2x2 triangular matrix.
Definition: MatrixLogarithm.h:41
void matrix_log_compute_big(const MatrixType &A, MatrixType &result)
Compute logarithm of triangular matrices with size > 2.
Definition: MatrixLogarithm.h:226

References Eigen::bfloat16_impl::log(), Eigen::internal::matrix_log_compute_2x2(), Eigen::internal::matrix_log_compute_big(), and Eigen::PlainObjectBase< Derived >::rows().


The documentation for this class was generated from the following file: