Mackey  V3.3
A C++ library for computing RO(G) graded homology
mackey::SFINAE Namespace Reference

Contains typedefs used to detect types and existence of methods. More...

Typedefs

template<typename T >
using is_Dense = decltype(test_Dense(std::declval< T * >()))
 Detects if T is a dense matrix. More...
 
template<typename T >
using is_Sparse = decltype(test_Sparse(std::declval< T * >()))
 Detects if T is a sparse matrix. More...
 
template<typename T >
using is_sparse_row_major = decltype(test_SRM(std::declval< T * >()))
 Detects if T is sparse row major matrix. More...
 
template<typename T >
using is_finite_cyclic = decltype(test_finite_cyclic(std::declval< T >()))
 Detects if T=Z<N> More...
 
template<typename T >
using has_operator_evaluation_int_int = decltype(test_operator_evaluation_int_int< T >(0))
 Detects if T has an operator()(int,int) More...
 

Functions

constexpr std::false_type test_Dense (...)
 Detects if T is a dense matrix. More...
 
template<typename T >
constexpr std::true_type test_Dense (Eigen::MatrixBase< T > *)
 Detects if T is a dense matrix. More...
 
constexpr std::false_type test_Sparse (...)
 Detects if T is a sparse matrix. More...
 
template<typename T >
constexpr std::true_type test_Sparse (Eigen::SparseMatrixBase< T > *)
 Detects if T is a sparse matrix. More...
 
constexpr std::false_type test_SRM (...)
 Detects if T is sparse row major matrix. More...
 
template<typename T , typename S >
constexpr std::true_type test_SRM (Eigen::SparseMatrix< T, 1, S > *)
 Detects if T is sparse row major matrix. More...
 
constexpr std::false_type test_finite_cyclic (...)
 Detects if T=Z<N> More...
 
template<int64_t N, typename T >
constexpr std::true_type test_finite_cyclic (Z_mod< N, T >)
 Detects if T=Z<N> More...
 
template<typename T >
constexpr std::false_type test_operator_evaluation_int_int (...)
 Detects if T has an operator()(int,int) More...
 
template<typename T >
constexpr decltype(std::declval< T >().operator()(std::declval< int >(), std::declval< int >()), std::true_type()) test_operator_evaluation_int_int (int)
 Detects if T has an operator()(int,int) More...
 

Detailed Description

Contains typedefs used to detect types and existence of methods.

Todo:
Replace with concepts

Only use the typedefs eg constexpr bool b= SFINAE::is_Sparse<T>::value;

Typedef Documentation

◆ is_Dense

using is_Dense = decltype(test_Dense(std::declval<T*>()))

Detects if T is a dense matrix.

◆ is_Sparse

using is_Sparse = decltype(test_Sparse(std::declval<T*>()))

Detects if T is a sparse matrix.

◆ is_sparse_row_major

using is_sparse_row_major = decltype(test_SRM(std::declval<T*>()))

Detects if T is sparse row major matrix.

◆ is_finite_cyclic

using is_finite_cyclic = decltype(test_finite_cyclic(std::declval<T>()))

Detects if T=Z<N>

◆ has_operator_evaluation_int_int

Detects if T has an operator()(int,int)

Function Documentation

◆ test_Dense() [1/2]

constexpr std::false_type mackey::SFINAE::test_Dense (   ...)
constexpr

Detects if T is a dense matrix.

◆ test_Dense() [2/2]

constexpr std::true_type mackey::SFINAE::test_Dense ( Eigen::MatrixBase< T > *  )
constexpr

Detects if T is a dense matrix.

◆ test_Sparse() [1/2]

constexpr std::false_type mackey::SFINAE::test_Sparse (   ...)
constexpr

Detects if T is a sparse matrix.

◆ test_Sparse() [2/2]

constexpr std::true_type mackey::SFINAE::test_Sparse ( Eigen::SparseMatrixBase< T > *  )
constexpr

Detects if T is a sparse matrix.

◆ test_SRM() [1/2]

constexpr std::false_type mackey::SFINAE::test_SRM (   ...)
constexpr

Detects if T is sparse row major matrix.

◆ test_SRM() [2/2]

constexpr std::true_type mackey::SFINAE::test_SRM ( Eigen::SparseMatrix< T, 1, S > *  )
constexpr

Detects if T is sparse row major matrix.

◆ test_finite_cyclic() [1/2]

constexpr std::false_type mackey::SFINAE::test_finite_cyclic (   ...)
constexpr

Detects if T=Z<N>

◆ test_finite_cyclic() [2/2]

constexpr std::true_type mackey::SFINAE::test_finite_cyclic ( Z_mod< N, T >  )
constexpr

Detects if T=Z<N>

◆ test_operator_evaluation_int_int() [1/2]

constexpr std::false_type mackey::SFINAE::test_operator_evaluation_int_int (   ...)
constexpr

Detects if T has an operator()(int,int)

◆ test_operator_evaluation_int_int() [2/2]

constexpr decltype(std::declval<T>().operator()(std::declval<int>(), std::declval<int>()), std::true_type()) mackey::SFINAE::test_operator_evaluation_int_int ( int  )
constexpr

Detects if T has an operator()(int,int)