<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
eigen.hpp File Reference
#include <Eigen/Core>
#include <cassert>
#include "tlapack/base/arrayTraits.hpp"
#include "tlapack/plugins/stdvector.hpp"
Include dependency graph for eigen.hpp:

Go to the source code of this file.

Classes

struct  tlapack::traits::complex_type_traits< matrix_t, typename std::enable_if< is_eigen_type< matrix_t >, int >::type >
 
struct  tlapack::traits::CreateFunctor< U, typename std::enable_if< is_eigen_type< U >, int >::type >
 Create Eigen::Matrix,. More...
 
struct  tlapack::traits::CreateStaticFunctor< U, m, n, typename std::enable_if< is_eigen_type< U >, int >::type >
 Create Eigen::Matrix. More...
 
struct  tlapack::traits::internal::isStdComplex< class >
 
struct  tlapack::traits::internal::isStdComplex< std::complex< T > >
 
struct  tlapack::traits::layout_trait< matrix_t, typename std::enable_if< is_eigen_type< matrix_t > &&(matrix_t::InnerStrideAtCompileTime==1||matrix_t::OuterStrideAtCompileTime==1), int >::type >
 Layout for Eigen::Dense types. More...
 
struct  tlapack::traits::matrix_type_traits< matrixA_t, matrixB_t, typename std::enable_if<((is_eigen_type< matrixA_t >||is_eigen_type< matrixB_t >)&&cast_to_eigen_type< matrixA_t > &&cast_to_eigen_type< matrixB_t >), int >::type >
 
struct  tlapack::traits::matrix_type_traits< vecA_t, vecB_t, std::enable_if_t< traits::is_stdvector_type< vecA_t > &&traits::is_stdvector_type< vecB_t >, int > >
 
struct  tlapack::traits::real_type_traits< matrix_t, typename std::enable_if< is_eigen_type< matrix_t >, int >::type >
 
struct  tlapack::traits::vector_type_traits< vecA_t, vecB_t, std::enable_if_t< traits::is_stdvector_type< vecA_t > &&traits::is_stdvector_type< vecB_t >, int > >
 
struct  tlapack::traits::vector_type_traits< vecA_t, vecB_t, typename std::enable_if<((is_eigen_type< vecA_t >||is_eigen_type< vecB_t >)&&cast_to_eigen_type< vecA_t > &&cast_to_eigen_type< vecB_t >), int >::type >
 

Functions

template<class XprType , int BlockRows, int BlockCols, bool InnerPanel>
constexpr auto tlapack::col (const Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, Eigen::Index colIdx) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel>
constexpr auto tlapack::col (Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, Eigen::Index colIdx) noexcept
 
template<class T , typename std::enable_if< traits::is_eigen_type< T > &&!traits::internal::is_eigen_block< T >, int >::type = 0>
constexpr auto tlapack::col (T &A, Eigen::Index colIdx) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel, typename SliceSpec >
constexpr auto tlapack::cols (const Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, SliceSpec &&cols) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel, typename SliceSpec >
constexpr auto tlapack::cols (Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, SliceSpec &&cols) noexcept
 
template<class T , typename SliceSpec , typename std::enable_if< traits::is_eigen_type< T > &&!traits::internal::is_eigen_block< T >, int >::type = 0>
constexpr auto tlapack::cols (T &A, SliceSpec &&cols) noexcept
 
template<class T , typename std::enable_if< traits::internal::is_eigen_matrix< T >, int >::type = 0>
constexpr auto tlapack::diag (T &A, int diagIdx=0) noexcept
 Get the Diagonal of an Eigen Matrix.
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel>
std::true_type tlapack::traits::internal::is_eigen_block_f (const Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > *)
 
std::false_type tlapack::traits::internal::is_eigen_block_f (const void *)
 
template<class Derived >
std::true_type tlapack::traits::internal::is_eigen_dense_f (const Eigen::DenseBase< Derived > *)
 
std::false_type tlapack::traits::internal::is_eigen_dense_f (const void *)
 
template<class Derived >
std::true_type tlapack::traits::internal::is_eigen_matrix_f (const Eigen::MatrixBase< Derived > *)
 
std::false_type tlapack::traits::internal::is_eigen_matrix_f (const void *)
 
template<class Derived >
constexpr auto tlapack::legacy_matrix (const Eigen::MapBase< Derived, Eigen::ReadOnlyAccessors > &A) noexcept
 
template<class T , int Rows, int Cols, int Options, int MaxRows, int MaxCols>
constexpr auto tlapack::legacy_matrix (const Eigen::Matrix< T, Rows, Cols, Options, MaxRows, MaxCols > &A) noexcept
 
template<class Derived >
constexpr auto tlapack::legacy_vector (const Eigen::MapBase< Derived, Eigen::ReadOnlyAccessors > &A) noexcept
 
template<class T , int Rows, int Cols, int Options, int MaxRows, int MaxCols>
constexpr auto tlapack::legacy_vector (const Eigen::Matrix< T, Rows, Cols, Options, MaxRows, MaxCols > &A) noexcept
 
template<class T >
constexpr auto tlapack::ncols (const Eigen::EigenBase< T > &x) noexcept
 
template<class T >
constexpr auto tlapack::nrows (const Eigen::EigenBase< T > &x) noexcept
 
template<class matrix_t , typename std::enable_if<(traits::is_eigen_type< matrix_t > &&!matrix_t::IsVectorAtCompileTime), int >::type = 0>
auto tlapack::reshape (matrix_t &A, Eigen::Index m, Eigen::Index n)
 
template<class matrix_t , typename std::enable_if<(traits::is_eigen_type< matrix_t > &&!matrix_t::IsVectorAtCompileTime), int >::type = 0>
auto tlapack::reshape (matrix_t &A, Eigen::Index n)
 
template<class vector_t , typename std::enable_if<(traits::is_eigen_type< vector_t > &&vector_t::IsVectorAtCompileTime), int >::type = 0>
auto tlapack::reshape (vector_t &v, Eigen::Index m, Eigen::Index n)
 
template<class vector_t , typename std::enable_if<(traits::is_eigen_type< vector_t > &&vector_t::IsVectorAtCompileTime), int >::type = 0>
auto tlapack::reshape (vector_t &v, Eigen::Index n)
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel>
constexpr auto tlapack::row (const Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, Eigen::Index rowIdx) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel>
constexpr auto tlapack::row (Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, Eigen::Index rowIdx) noexcept
 
template<class T , typename std::enable_if< traits::is_eigen_type< T > &&!traits::internal::is_eigen_block< T >, int >::type = 0>
constexpr auto tlapack::row (T &A, Eigen::Index rowIdx) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel, typename SliceSpec >
constexpr auto tlapack::rows (const Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, SliceSpec &&rows) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel, typename SliceSpec >
constexpr auto tlapack::rows (Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, SliceSpec &&rows) noexcept
 
template<class T , typename SliceSpec , typename std::enable_if< traits::is_eigen_type< T > &&!traits::internal::is_eigen_block< T >, int >::type = 0>
constexpr auto tlapack::rows (T &A, SliceSpec &&rows) noexcept
 
template<class Derived >
constexpr auto tlapack::size (const Eigen::EigenBase< Derived > &x) noexcept
 
template<class T , int Rows, int Cols, int Options, int MaxRows, int MaxCols, std::enable_if_t<!(traits::internal::isStdComplex< std::decay_t< T > >::value), int > = 0>
constexpr auto tlapack::size (const Eigen::Matrix< T, Rows, Cols, Options, MaxRows, MaxCols > &x) noexcept
 
template<class XprType , int BlockCols, bool InnerPanel, typename SliceSpec >
constexpr auto tlapack::slice (const Eigen::Block< XprType, 1, BlockCols, InnerPanel > &x, SliceSpec &&range) noexcept
 
template<class XprType , int BlockRows, bool InnerPanel, typename SliceSpec >
constexpr auto tlapack::slice (const Eigen::Block< XprType, BlockRows, 1, InnerPanel > &x, SliceSpec &&range) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel, typename SliceSpecCol >
constexpr auto tlapack::slice (const Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, Eigen::Index rowIdx, SliceSpecCol &&cols) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel, typename SliceSpecRow >
constexpr auto tlapack::slice (const Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, SliceSpecRow &&rows, Eigen::Index colIdx) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel, class SliceSpecRow , class SliceSpecCol , typename std::enable_if< isSlice(SliceSpecRow) &&isSlice(SliceSpecCol), int >::type = 0>
constexpr auto tlapack::slice (const Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, SliceSpecRow &&rows, SliceSpecCol &&cols) noexcept
 
template<class XprType , int BlockCols, bool InnerPanel, typename SliceSpec >
constexpr auto tlapack::slice (Eigen::Block< XprType, 1, BlockCols, InnerPanel > &x, SliceSpec &&range) noexcept
 
template<class XprType , int BlockRows, bool InnerPanel, typename SliceSpec >
constexpr auto tlapack::slice (Eigen::Block< XprType, BlockRows, 1, InnerPanel > &x, SliceSpec &&range) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel, typename SliceSpecCol >
constexpr auto tlapack::slice (Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, Eigen::Index rowIdx, SliceSpecCol &&cols) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel, typename SliceSpecRow >
constexpr auto tlapack::slice (Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, SliceSpecRow &&rows, Eigen::Index colIdx) noexcept
 
template<class XprType , int BlockRows, int BlockCols, bool InnerPanel, class SliceSpecRow , class SliceSpecCol , typename std::enable_if< isSlice(SliceSpecRow) &&isSlice(SliceSpecCol), int >::type = 0>
constexpr auto tlapack::slice (Eigen::Block< XprType, BlockRows, BlockCols, InnerPanel > &A, SliceSpecRow &&rows, SliceSpecCol &&cols) noexcept
 
template<class T , typename SliceSpecCol , typename std::enable_if< traits::is_eigen_type< T > &&!traits::internal::is_eigen_block< T >, int >::type = 0>
constexpr auto tlapack::slice (T &A, Eigen::Index rowIdx, SliceSpecCol &&cols) noexcept
 
template<class T , typename SliceSpecRow , typename std::enable_if< traits::is_eigen_type< T > &&!traits::internal::is_eigen_block< T >, int >::type = 0>
constexpr auto tlapack::slice (T &A, SliceSpecRow &&rows, Eigen::Index colIdx) noexcept
 
template<class T , class SliceSpecRow , class SliceSpecCol , typename std::enable_if< isSlice(SliceSpecRow) &&isSlice(SliceSpecCol) &&traits::is_eigen_type< T > &&!traits::internal::is_eigen_block< T >, int >::type = 0>
constexpr auto tlapack::slice (T &A, SliceSpecRow &&rows, SliceSpecCol &&cols) noexcept
 
template<class T , typename SliceSpec , typename std::enable_if< traits::is_eigen_type< T > &&!traits::internal::is_eigen_block< T >, int >::type = 0>
constexpr auto tlapack::slice (T &x, SliceSpec &&range) noexcept
 
template<class matrix_t , typename std::enable_if<(traits::is_eigen_type< matrix_t > &&!matrix_t::IsVectorAtCompileTime), int >::type = 0>
constexpr auto tlapack::transpose_view (matrix_t &A) noexcept
 

Variables

template<typename T >
constexpr bool tlapack::traits::cast_to_eigen_type = is_eigen_type<T> || is_stdvector_type<T>
 
template<class T >
constexpr bool tlapack::traits::internal::is_eigen_block
 True if T is derived from Eigen::EigenBlock.
 
template<class T >
constexpr bool tlapack::traits::internal::is_eigen_dense
 True if T is derived from Eigen::EigenDense<T>
 
template<class T >
constexpr bool tlapack::traits::internal::is_eigen_matrix
 True if T is derived from Eigen::EigenMatrix<T>
 
template<class T >
constexpr bool tlapack::traits::is_eigen_type = internal::is_eigen_dense<T>
 True if T is derived from Eigen::DenseBase.
 

Detailed Description

Author
Weslley S Pereira, University of Colorado Denver, USA

Variable Documentation

◆ is_eigen_block

template<class T >
constexpr bool tlapack::traits::internal::is_eigen_block
constexpr
Initial value:
=
decltype(is_eigen_block_f(std::declval<T*>()))::value

True if T is derived from Eigen::EigenBlock.

See also
https://stackoverflow.com/a/25223400/5253097

◆ is_eigen_dense

template<class T >
constexpr bool tlapack::traits::internal::is_eigen_dense
constexpr
Initial value:
=
decltype(is_eigen_dense_f(std::declval<T*>()))::value

True if T is derived from Eigen::EigenDense<T>

See also
https://stackoverflow.com/a/25223400/5253097

◆ is_eigen_matrix

template<class T >
constexpr bool tlapack::traits::internal::is_eigen_matrix
constexpr
Initial value:
=
decltype(is_eigen_matrix_f(std::declval<T*>()))::value

True if T is derived from Eigen::EigenMatrix<T>

See also
https://stackoverflow.com/a/25223400/5253097

◆ is_eigen_type

template<class T >
constexpr bool tlapack::traits::is_eigen_type = internal::is_eigen_dense<T>
constexpr

True if T is derived from Eigen::DenseBase.

See also
https://stackoverflow.com/a/25223400/5253097