21 #ifndef RFFGEN_CONCEPT_CHECK_HH
22 #define RFFGEN_CONCEPT_CHECK_HH
24 #include "LinearAlgebra/extractRowsAndCols.hh"
25 #include "Util/consistencyCheck.hh"
37 template <
class Arg >
40 static_assert(std::is_copy_constructible<Arg>(),
"CopyConcept: Input types must be copy-constructible.");
41 static_assert(std::is_copy_assignable<Arg>(),
"CopyConcept: Input types must be copy-assignable.");
50 template <
class Arg >
53 static_assert(Checks::multiplicationWithArithmeticFromLeft< Arg , double > () ||
54 Checks::inPlaceMultiplicationWithArithmetic< Arg , double >(),
55 "MultiplyWithArithmeticFromLeftConcept: Input types must support multiplication with double from the left (operator*(double,const Arg&))");
56 static_assert(Checks::multiplicationWithArithmeticFromLeft< Arg , int > () ||
57 Checks::inPlaceMultiplicationWithArithmetic< Arg , int >(),
58 "MultiplyWithArithmeticFromLeftConcept: Input types must support multiplication with int from the left (operator*(int,const Arg&))");
67 template <
class Arg >
70 static_assert(Checks::summation< Arg >() ||
71 Checks::inPlaceSummation< Arg >(),
72 "SummationConcept: Input types must support summation (operator+(const Arg&, const Arg&)");
80 template <
class Arg1 ,
class Arg2 >
83 static_assert(Checks::multiplication< Arg1 , Arg2 >() ||
84 Checks::callToRightMultiply< Arg1 , Arg2 >() ||
85 Checks::inPlaceMultiplication< Arg1 , Arg2 >(),
86 "MultiplicationConcept: Input types must support multiplication (operator*(const Arg&, const Arg&");
106 template <
class Matrix >
109 static_assert(Checks::accessViaSquareBrackets<Matrix>() ||
110 Checks::accessViaRoundBrackets<Matrix>(),
111 "MatrixConcept: Currently only matrices that allow access to their elements via A[i][j] or A(i,j) are supported.\nYou may contact the developer to ask for further access or provide your own patch.");
119 template <
class Vector >
122 static_assert(Checks::accessViaSquareBrackets<Vector>() ||
123 Checks::accessViaRoundBrackets<Vector>(),
124 "VectorConcept: Currently only vectors that allow access to their elements via v[i] or v(i) are supported.\nYou may contact the developer to ask for further access or provide your own patch.");
131 template <
class Matrix >
135 static_assert( LinearAlgebra::numberOfRows<Matrix>() == LinearAlgebra::numberOfColumns<Matrix>(),
136 "SymmetricMatrixConcept: Input matrix must be symmetric.");
147 static_assert( hasD0MemberFunction<F>() ,
148 "FunctionConcept: Functions must provide a member function d0() to access its value." );
153 #endif // RFFGEN_CONCEPT_CHECK_HH
Static check if the requirements of SummationConcept are satisfied.
Definition: conceptCheck.hh:68
Static check if the requirements of VectorConcept are satisfied.
Definition: conceptCheck.hh:120
Static checks for detection of presence of different operators and functions.
Static check if the requirements of MultiplyWithArithmeticFromLeftConcept are satisfied.
Definition: conceptCheck.hh:51
Static check if the requirements of ArithmeticConcept are satisfied.
Definition: conceptCheck.hh:95
Static check if the requirements of SymmetricMatrixConcept are satisfied.
Definition: conceptCheck.hh:132
Static check if the requirements of CopyConcept are satisfied.
Definition: conceptCheck.hh:38
Static check if the requirements of MultiplicationConcept are satisfied.
Definition: conceptCheck.hh:81
Static check if the requirements of MatrixConcept are satisfied.
Definition: conceptCheck.hh:107
Static check if the requirements of FunctionConcept are satisfied.
Definition: conceptCheck.hh:145