4 #ifndef CPPQEDCORE_UTILS_BLITZARRAYEXTENSIONS_H_INCLUDED
5 #define CPPQEDCORE_UTILS_BLITZARRAYEXTENSIONS_H_INCLUDED
9 #include <blitz/array.h>
11 #include <boost/math/special_functions/fpclassify.hpp>
17 inline bool isfinite(
double d) {
return boost::math::isfinite(d);}
19 BZ_DECLARE_FUNCTION_RET(isfinite,
bool) ;
22 inline double selectNegative(
double d) {
return d<0 ? d : 0;}
24 BZ_DECLARE_FUNCTION_RET(selectNegative,
double) ;
46 template<
typename T,
int RANK>
47 const blitz::Array<T,1>
71 template<
typename T,
int TWO_TIMES_RANK>
72 const blitz::Array<T,2>
73 binaryArray(
const blitz::Array<T,TWO_TIMES_RANK>& array);
79 #endif // CPPQEDCORE_UTILS_BLITZARRAYEXTENSIONS_H_INCLUDED
The class that is (meant to be, at least) the base of all exceptions in the framework.
const blitz::Array< T, 2 > binaryArray(const blitz::Array< T, TWO_TIMES_RANK > &array)
Returns a binary view of array. TWO_TIMES_RANK must be an even number.
Exception class thrown by binaryArray.
const blitz::Array< T, 1 > unaryArray(const blitz::Array< T, RANK > &)
Returns a unary view of array
Exception class thrown by unaryArray & binaryArray.
Comprises our own extensions to Blitz++.
Defines tentative base classes for the exception classes of the framework.