35 #ifndef _BLAZE_MATH_FUNCTIONS_H_
36 #define _BLAZE_MATH_FUNCTIONS_H_
66 template<
typename T >
67 inline int sign( T a );
69 template<
typename T >
70 inline size_t digits( T a );
72 template<
typename T1,
typename T2 >
74 min(
const T1& a,
const T2& b );
76 template<
typename T1,
typename T2,
typename T3 >
77 BLAZE_ALWAYS_INLINE const typename MathTrait< typename MathTrait<T1,T2>::HighType, T3 >::HighType
78 min(
const T1& a,
const T2& b,
const T3& c );
80 template<
typename T1,
typename T2 >
82 max(
const T1& a,
const T2& b );
84 template<
typename T1,
typename T2,
typename T3 >
85 BLAZE_ALWAYS_INLINE const typename MathTrait< typename MathTrait<T1,T2>::HighType, T3 >::HighType
86 max(
const T1& a,
const T2& b,
const T3& c );
88 template<
typename T >
91 template<
typename T1,
typename T2 >
107 template<
typename T >
113 return ( T(0) < a ) - ( a < T(0) );
138 template<
typename T >
167 template<
typename T1,
typename T2 >
177 return ( a < b )?( a ):( b );
195 template<
typename T1,
typename T2,
typename T3 >
196 BLAZE_ALWAYS_INLINE const typename MathTrait< typename MathTrait<T1,T2>::HighType, T3 >::HighType
197 min(
const T1& a,
const T2& b,
const T3& c )
206 return ( a < b )?( ( a < c )?( a ):( c ) ):( ( b < c )?( b ):( c ) );
223 template<
typename T1,
typename T2 >
233 return ( a < b )?( b ):( a );
251 template<
typename T1,
typename T2,
typename T3 >
252 BLAZE_ALWAYS_INLINE const typename MathTrait< typename MathTrait<T1,T2>::HighType, T3 >::HighType
253 max(
const T1& a,
const T2& b,
const T3& c )
262 return ( a < b )?( ( b < c )?( c ):( b ) ):( ( a < c )?( c ):( a ) );
279 template<
typename T >
303 return std::floor( a + 0.5F );
324 return std::floor( a + 0.5 );
345 return std::floor( a + 0.5L );
362 template<
typename T >
388 return ( b - a ) > 1E-8F;
411 return ( b - a ) > 1E-8;
434 return ( b - a ) > 1E-10;
452 template<
typename T1,
typename T2 >
456 return lessThan_backend<High>( a, b );
const MT::ElementType max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1649
Header file for basic type definitions.
Base template for the MathTrait class.
Definition: MathTrait.h:136
Compile time check for signed data types.This type trait tests whether or not the given template para...
Definition: IsSigned.h:96
int sign(T a)
Sign function.
Definition: Functions.h:108
#define BLAZE_CONSTRAINT_MUST_BE_INTEGRAL_TYPE(T)
Constraint on the data type.In case the given data type T is not an integral data type...
Definition: Integral.h:78
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the IsFloatingPoint type trait.
const MT::ElementType min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1602
Compile time check for floating point data types.This type trait tests whether or not the given templ...
Definition: IsFloatingPoint.h:94
Constraint on the data type.
Constraint on the data type.
Header file for the IsSigned type trait.
Header file for the mathematical trait.
#define BLAZE_CONSTRAINT_MUST_BE_BUILTIN_TYPE(T)
Constraint on the data type.In case the given data type T is not a built-in data type, a compilation error is created.
Definition: Builtin.h:78
BLAZE_ALWAYS_INLINE T round(T a)
Rounds the given input value.
Definition: Functions.h:280
size_t digits(T a)
Returns the number of valid digits of an integral value.
Definition: Functions.h:139
BLAZE_ALWAYS_INLINE bool lessThan(T1 a, T2 b)
Generic less-than comparison.
Definition: Functions.h:453
System settings for the inline keywords.
Constraint on the data type.