10 #include <boost/numeric/ublas/functional.hpp>
11 #include <boost/numeric/ublas/vector_expression.hpp>
13 namespace boost {
namespace numeric {
namespace ublas {
24 typedef typename scalar_unary_functor<T>::value_type value_type;
25 typedef typename scalar_unary_functor<T>::argument_type argument_type;
26 typedef typename scalar_unary_functor<T>::result_type result_type;
28 static result_type apply(argument_type t)
42 typename boost::numeric::ublas::vector_unary_traits<
45 exp(
const vector_expression<E>& e)
47 typedef typename boost::numeric::ublas::vector_unary_traits<
50 return expression_type(e());
59 double exp(
const double e)
73 typedef typename scalar_unary_functor<T>::value_type value_type;
74 typedef typename scalar_unary_functor<T>::argument_type argument_type;
75 typedef typename scalar_unary_functor<T>::result_type result_type;
77 static result_type apply(argument_type t)
91 typename boost::numeric::ublas::vector_unary_traits<
94 element_inverse(
const vector_expression<E>& e)
96 typedef typename boost::numeric::ublas::vector_unary_traits<
99 return expression_type(e());
108 double element_inverse(
const double e)
120 template <
typename T>
122 typedef typename scalar_unary_functor<T>::value_type value_type;
123 typedef typename scalar_unary_functor<T>::argument_type argument_type;
124 typedef typename scalar_unary_functor<T>::result_type result_type;
126 static result_type apply(argument_type t)
140 typename boost::numeric::ublas::vector_unary_traits<
143 sin(
const vector_expression<E>& e)
145 typedef typename boost::numeric::ublas::vector_unary_traits<
148 return expression_type(e());
157 double sin(
const double e)
169 template <
typename T>
171 typedef typename scalar_unary_functor<T>::value_type value_type;
172 typedef typename scalar_unary_functor<T>::argument_type argument_type;
173 typedef typename scalar_unary_functor<T>::result_type result_type;
175 static result_type apply(argument_type t)
189 typename boost::numeric::ublas::vector_unary_traits<
192 cos(
const vector_expression<E>& e)
194 typedef typename boost::numeric::ublas::vector_unary_traits<
197 return expression_type(e());
206 double cos(
const double e)
Definition: ublas_unary_operator.hpp:13
Definition: ublas_unary_operator.hpp:72
Definition: ublas_unary_operator.hpp:13
Definition: ublas_unary_operator.hpp:170
Definition: ublas_unary_operator.hpp:23
Definition: ublas_unary_operator.hpp:121