ALPSCore reference
Classes | Namespaces | Macros | Functions
boost_array_functions.hpp File Reference
#include <alps/utilities/stacktrace.hpp>
#include <alps/numeric/inf.hpp>
#include <alps/numeric/special_functions.hpp>
#include <boost/throw_exception.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/array.hpp>
#include <algorithm>
#include <functional>
#include <cmath>
#include <stdexcept>
Include dependency graph for boost_array_functions.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  alps::numeric::inf< boost::array< double, N > >
 

Namespaces

 alps
 
 alps::numeric
 

Macros

#define ALPS_NUMERIC_OPERATOR_EQ(OP_NAME, OPERATOR)
 
#define ALPS_NUMERIC_IMPLEMENT_FUNCTION(FUNCTION_NAME)
 
#define ALPS_NUMERIC_IMPLEMENT_FUNCTION(FUNCTION_NAME)
 

Functions

template<typename T , std::size_t N>
boost::array< T, N > & alps::numeric::operator+= (boost::array< T, N > &lhs, boost::array< T, N > const &rhs)
 
template<typename T , std::size_t N>
boost::array< T, N > & alps::numeric::operator-= (boost::array< T, N > &lhs, boost::array< T, N > const &rhs)
 
template<typename T , std::size_t N>
boost::array< T, N > & alps::numeric::operator*= (boost::array< T, N > &lhs, boost::array< T, N > const &rhs)
 
template<typename T , std::size_t N>
boost::array< T, N > & alps::numeric::operator/= (boost::array< T, N > &lhs, boost::array< T, N > const &rhs)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::operator- (boost::array< T, N > lhs)
 
template<typename T , typename U , std::size_t N>
boost::array< T, N > alps::numeric::operator+ (boost::array< T, N > lhs, boost::array< U, N > const &rhs)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::operator+ (boost::array< T, N > arg, T const &scalar)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::operator+ (T const &scalar, boost::array< T, N > arg)
 
template<typename T , typename U , std::size_t N>
boost::array< T, N > alps::numeric::operator- (boost::array< T, N > lhs, boost::array< U, N > const &rhs)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::operator- (boost::array< T, N > arg, T const &scalar)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::operator- (T const &scalar, boost::array< T, N > arg)
 
template<typename T , typename U , std::size_t N>
boost::array< T, N > alps::numeric::operator* (boost::array< T, N > lhs, boost::array< U, N > const &rhs)
 
template<typename T , typename U , std::size_t N>
boost::array< T, N > alps::numeric::operator/ (boost::array< T, N > lhs, boost::array< U, N > const &rhs)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::operator* (boost::array< T, N > lhs, T const &scalar)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::operator* (T const &scalar, boost::array< T, N > rhs)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::operator/ (boost::array< T, N > lhs, T const &scalar)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::operator/ (T const &scalar, boost::array< T, N > rhs)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::sin (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::cos (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::tan (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::sinh (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::cosh (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::tanh (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::asin (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::acos (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::atan (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::abs (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::sqrt (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::exp (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::log (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::sq (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::cb (boost::array< T, N > arg)
 
template<typename T , std::size_t N>
boost::array< T, N > alps::numeric::cbrt (boost::array< T, N > arg)
 

Macro Definition Documentation

#define ALPS_NUMERIC_IMPLEMENT_FUNCTION (   FUNCTION_NAME)
Value:
template<typename T, std::size_t N> boost::array<T, N> FUNCTION_NAME (boost::array<T, N> arg) { \
using std:: FUNCTION_NAME ; \
std::transform(arg.begin(), arg.end(), arg.begin(), static_cast<double (*)(double)>(& FUNCTION_NAME )); \
return arg; \
}
mean_result< T > transform(no_prop, const transformer< T > &tf, const InResult &in)
Definition: transform.hpp:27

Definition at line 162 of file boost_array_functions.hpp.

#define ALPS_NUMERIC_IMPLEMENT_FUNCTION (   FUNCTION_NAME)
Value:
template<typename T, std::size_t N> boost::array<T, N> FUNCTION_NAME (boost::array<T, N> arg) { \
using alps::numeric:: FUNCTION_NAME ; \
std::transform(arg.begin(), arg.end(), arg.begin(), static_cast<double (*)(double)>(& FUNCTION_NAME )); \
return arg; \
}
mean_result< T > transform(no_prop, const transformer< T > &tf, const InResult &in)
Definition: transform.hpp:27

Definition at line 162 of file boost_array_functions.hpp.

#define ALPS_NUMERIC_OPERATOR_EQ (   OP_NAME,
  OPERATOR 
)
Value:
template<typename T, std::size_t N> \
boost::array<T, N> & OP_NAME (boost::array<T, N> & lhs, boost::array<T, N> const & rhs) { \
if(lhs.size() != rhs.size()) \
boost::throw_exception(std::runtime_error("arrays must have the same size!" + ALPS_STACKTRACE)); \
std::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs.begin(), std:: OPERATOR <T>() ); \
return lhs; \
}
mean_result< T > transform(no_prop, const transformer< T > &tf, const InResult &in)
Definition: transform.hpp:27
#define ALPS_STACKTRACE
Definition: stacktrace.hpp:37

Definition at line 28 of file boost_array_functions.hpp.