funcy  1.6.1
Classes | Variables
Concepts

Concepts used in funcy. More...

Classes

struct  funcy::linalg::detail::NumberOfRows< Matrix >
 Get number of rows for constant size matrices. More...
 
struct  funcy::linalg::detail::NumberOfColumns< Matrix >
 Get number of columns for constant size matrices. More...
 
struct  funcy::linalg::detail::GetTransposed< class >
 Get transposed of constant-size matrix. More...
 

Variables

template<class T >
concept funcy::Function
 Function concept. More...
 
template<class T >
concept funcy::Arithmetic = is_arithmetic< T >::value
 Extensible concept for arithmetic types. More...
 
template<class V >
concept funcy::linalg::ConstantSize = linalg::detail::NumberOfRows< V >::value > 0
 Constant-size matrix concept.
 
template<class M >
concept funcy::linalg::SquareMatrix
 Constant-size square matrix concept. More...
 
template<class T >
concept funcy::linalg::Matrix
 clang-format off More...
 
template<class T >
concept funcy::linalg::Vector
 Vector concept. More...
 

Detailed Description

Concepts used in funcy.

Variable Documentation

◆ Arithmetic

template<class T >
concept funcy::Arithmetic = is_arithmetic< T >::value

Extensible concept for arithmetic types.

You may extend this by registering your additional arithmetic types by providing suitable overloads of funcy::is_arithmetic.

◆ Function

template<class T >
concept funcy::Function
Initial value:
= requires( T t )
{
{ T( t ) };
{ t() };
}

Function concept.

This is the main concept of funcy.

◆ Matrix

template<class T >
concept funcy::linalg::Matrix
Initial value:
= (
requires( T t ) { { t[ 0 ][ 0 ] }; } ||
requires( T t ) { { t( 0, 0 ) }; } ) &&
(
requires( std::decay_t< T > t ) { { t *= 2.0 }; } ||
requires( std::decay_t< T > t ) { { t = 2.0 * t }; } ) &&
std::copy_constructible< T >

clang-format off

Matrix concept.

◆ SquareMatrix

template<class M >
concept funcy::linalg::SquareMatrix
Initial value:
= ( ( linalg::detail::NumberOfRows< M >::value ==
linalg::detail::NumberOfColumns< M >::value ) &&
ConstantSize< M > )

Constant-size square matrix concept.

◆ Vector

template<class T >
concept funcy::linalg::Vector
Initial value:
= (
requires( T t ) { { t[ 0 ] }; } || requires( T t ) { { t( 0 ) }; } ) &&
(
requires( std::decay_t< T > t ) { { t *= 2.0 }; } ||
requires( std::decay_t< T > t ) { { t = 2.0 * t }; } ) &&
std::copy_constructible< T >

Vector concept.