Namespaces | Functions

/export/development/ViennaMath/viennamath/manipulation/detail/unary_operations.hpp File Reference

Contains the handling of unary operations (overloads for exp(), etc.). More...

#include <string>
#include <vector>
#include <math.h>
#include "viennamath/forwards.h"
#include "viennamath/exception.hpp"
#include "viennamath/compiletime/unary_op_tags.hpp"
#include "viennamath/runtime/unary_expr.hpp"
#include "viennamath/runtime/binary_expr.hpp"
#include "viennamath/runtime/integral.hpp"

Go to the source code of this file.

Namespaces

namespace  viennamath
 

The main ViennaMath namespace. All types and functions for the user reside here.


Functions

template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_id< NumericT >, const InterfaceType *diff_var)
 Differentation of a unary expression containing identity.
template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_exp< NumericT >, const InterfaceType *diff_var)
 Differentation of exp(e), where e is an expression.
template<typename NumericT , typename InterfaceType >
rt_unary_expr< InterfaceType > exp (rt_constant< NumericT, InterfaceType > const &other)
 Overload of the exponential function for a ViennaMath runtime constant.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > exp (rt_variable< InterfaceType > const &other)
 Overload of the exponential function for a ViennaMath runtime variable.
template<id_type id>
rt_unary_expr exp (ct_variable< id > const &other)
 Overload of the exponential function for a ViennaMath compiletime variable.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > exp (rt_binary_expr< InterfaceType > const &other)
 Overload of the exponential function for a ViennaMath runtime binary expression.
template<typename LHS , typename OP , typename RHS >
rt_unary_expr exp (ct_binary_expr< LHS, OP, RHS > const &other)
 Overload of the exponential function for a ViennaMath compiletime binary expression.
template<typename LHS , typename OP >
rt_unary_expr exp (ct_unary_expr< LHS, OP > const &other)
 Overload of the exponential function for a ViennaMath compiletime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > exp (rt_expr< InterfaceType > const &other)
 Overload of the exponential function for a ViennaMath runtime expression wrapper.
template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_sin< NumericT >, const InterfaceType *diff_var)
 Differentation of sin(e), where e is an expression.
template<typename NumericT , typename InterfaceType >
rt_unary_expr< InterfaceType > sin (rt_constant< NumericT, InterfaceType > const &other)
 Overload of the sine function for a ViennaMath runtime constant.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > sin (rt_variable< InterfaceType > const &other)
 Overload of the sine function for a ViennaMath runtime variable.
template<id_type id>
rt_unary_expr sin (ct_variable< id > const &other)
 Overload of the sine function for a ViennaMath compiletime variable.
template<typename LHS , typename OP , typename RHS >
rt_unary_expr sin (ct_binary_expr< LHS, OP, RHS > const &other)
 Overload of the sine function for a ViennaMath compiletime binary expression.
template<typename LHS , typename OP >
rt_unary_expr sin (ct_unary_expr< LHS, OP > const &other)
 Overload of the sine function for a ViennaMath compiletime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > sin (rt_unary_expr< InterfaceType > const &other)
 Overload of the sine function for a ViennaMath runtime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > sin (rt_binary_expr< InterfaceType > const &other)
 Overload of the sine function for a ViennaMath runtime binary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > sin (rt_expr< InterfaceType > const &other)
 Overload of the sine function for a ViennaMath runtime expression wrapper.
template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_cos< NumericT >, const InterfaceType *diff_var)
 Differentation of cos(e), where e is an expression.
template<typename NumericT , typename InterfaceType >
rt_unary_expr< InterfaceType > cos (rt_constant< NumericT, InterfaceType > const &other)
 Overload of the cosine function for a ViennaMath runtime constant.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > cos (rt_variable< InterfaceType > const &other)
 Overload of the cosine function for a ViennaMath runtime variable.
template<id_type id>
rt_unary_expr cos (ct_variable< id > const &other)
 Overload of the cosine function for a ViennaMath compiletime variable.
template<typename LHS , typename OP , typename RHS >
rt_unary_expr cos (ct_binary_expr< LHS, OP, RHS > const &other)
 Overload of the cosine function for a ViennaMath compiletime binary expression.
template<typename LHS , typename OP >
rt_unary_expr cos (ct_unary_expr< LHS, OP > const &other)
 Overload of the cosine function for a ViennaMath compiletime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > cos (rt_unary_expr< InterfaceType > const &other)
 Overload of the cosine function for a ViennaMath runtime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > cos (rt_binary_expr< InterfaceType > const &other)
 Overload of the cosine function for a ViennaMath runtime binary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > cos (rt_expr< InterfaceType > const &other)
 Overload of the cosine function for a ViennaMath runtime expression wrapper.
template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_tan< NumericT >, const InterfaceType *diff_var)
 Differentation of tan(e), where e is an expression.
template<typename NumericT , typename InterfaceType >
rt_unary_expr< InterfaceType > tan (rt_constant< NumericT, InterfaceType > const &other)
 Overload of the tangent function for a ViennaMath runtime constant.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > tan (rt_variable< InterfaceType > const &other)
 Overload of the tangent function for a ViennaMath runtime variable.
template<id_type id>
rt_unary_expr tan (ct_variable< id > const &other)
 Overload of the tangent function for a ViennaMath compiletime variable.
template<typename LHS , typename OP , typename RHS >
rt_unary_expr tan (ct_binary_expr< LHS, OP, RHS > const &other)
 Overload of the tangent function for a ViennaMath compiletime binary expression.
template<typename LHS , typename OP >
rt_unary_expr tan (ct_unary_expr< LHS, OP > const &other)
 Overload of the tangent function for a ViennaMath compiletime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > tan (rt_unary_expr< InterfaceType > const &other)
 Overload of the tangent function for a ViennaMath runtime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > tan (rt_binary_expr< InterfaceType > const &other)
 Overload of the tangent function for a ViennaMath runtime binary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > tan (rt_expr< InterfaceType > const &other)
 Overload of the tangent function for a ViennaMath runtime expression wrapper.
template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_fabs< NumericT >, const InterfaceType *diff_var)
 Implementation of the differentation of |e|, where e is an expression. Since the modulus is not differentiable everywhere, an exception is thrown.
template<typename NumericT , typename InterfaceType >
rt_unary_expr< InterfaceType > fabs (rt_constant< NumericT, InterfaceType > const &other)
 Overload of the modulus function for a ViennaMath runtime constant.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > fabs (rt_variable< InterfaceType > const &other)
 Overload of the modulus function for a ViennaMath runtime variable.
template<id_type id>
rt_unary_expr fabs (ct_variable< id > const &other)
 Overload of the modulus function for a ViennaMath compiletime variable.
template<typename LHS , typename OP , typename RHS >
rt_unary_expr fabs (ct_binary_expr< LHS, OP, RHS > const &other)
 Overload of the modulus function for a ViennaMath compiletime binary expression.
template<typename LHS , typename OP >
rt_unary_expr fabs (ct_unary_expr< LHS, OP > const &other)
 Overload of the modulus function for a ViennaMath compiletime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > fabs (rt_unary_expr< InterfaceType > const &other)
 Overload of the modulus function for a ViennaMath runtime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > fabs (rt_binary_expr< InterfaceType > const &other)
 Overload of the modulus function for a ViennaMath runtime binary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > fabs (rt_expr< InterfaceType > const &other)
 Overload of the modulus function for a ViennaMath runtime expression wrapper.
template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_sqrt< NumericT >, const InterfaceType *diff_var)
 Implementation of the differentation of \sqrt{e}, where e is an expression.
template<typename NumericT , typename InterfaceType >
rt_unary_expr< InterfaceType > sqrt (rt_constant< NumericT, InterfaceType > const &other)
 Overload of the square-root function for a ViennaMath runtime constant.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > sqrt (rt_variable< InterfaceType > const &other)
 Overload of the square-root function for a ViennaMath runtime variable.
template<id_type id>
rt_unary_expr sqrt (ct_variable< id > const &other)
 Overload of the square-root function for a ViennaMath compiletime variable.
template<typename LHS , typename OP , typename RHS >
rt_unary_expr sqrt (ct_binary_expr< LHS, OP, RHS > const &other)
 Overload of the square-root function for a ViennaMath compiletime binary expression.
template<typename LHS , typename OP >
rt_unary_expr sqrt (ct_unary_expr< LHS, OP > const &other)
 Overload of the square-root function for a ViennaMath compiletime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > sqrt (rt_unary_expr< InterfaceType > const &other)
 Overload of the square-root function for a ViennaMath runtime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > sqrt (rt_binary_expr< InterfaceType > const &other)
 Overload of the square-root function for a ViennaMath runtime binary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > sqrt (rt_expr< InterfaceType > const &other)
 Overload of the square-root function for a ViennaMath runtime expression wrapper.
template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_log< NumericT >, const InterfaceType *diff_var)
 Implementation of the differentation of ln(e), where e is an expression.
template<typename NumericT , typename InterfaceType >
rt_unary_expr< InterfaceType > log (rt_constant< NumericT, InterfaceType > const &other)
 Overload of the natural logarithm function for a ViennaMath runtime constant.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > log (rt_variable< InterfaceType > const &other)
 Overload of the natural logarithm function for a ViennaMath runtime variable.
template<id_type id>
rt_unary_expr log (ct_variable< id > const &other)
 Overload of the natural logarithm function for a ViennaMath compiletime variable.
template<typename LHS , typename OP , typename RHS >
rt_unary_expr log (ct_binary_expr< LHS, OP, RHS > const &other)
 Overload of the natural logarithm function for a ViennaMath compiletime binary expression.
template<typename LHS , typename OP >
rt_unary_expr log (ct_unary_expr< LHS, OP > const &other)
 Overload of the natural logarithm function for a ViennaMath compiletime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > log (rt_unary_expr< InterfaceType > const &other)
 Overload of the natural logarithm function for a ViennaMath runtime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > log (rt_binary_expr< InterfaceType > const &other)
 Overload of the natural logarithm function for a ViennaMath runtime binary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > log (rt_expr< InterfaceType > const &other)
 Overload of the natural logarithm function for a ViennaMath runtime expression wrapper.
template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_log10< NumericT >, const InterfaceType *diff_var)
 Implementation of the differentation of log10(e), where e is an expression.
template<typename NumericT , typename InterfaceType >
rt_unary_expr< InterfaceType > log10 (rt_constant< NumericT, InterfaceType > const &other)
 Overload of the logarithm with base 10 for a ViennaMath runtime constant.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > log10 (rt_variable< InterfaceType > const &other)
 Overload of the logarithm with base 10 for a ViennaMath runtime variable.
template<id_type id>
rt_unary_expr log10 (ct_variable< id > const &other)
 Overload of the logarithm with base 10 for a ViennaMath compiletime variable.
template<typename LHS , typename OP , typename RHS >
rt_unary_expr log10 (ct_binary_expr< LHS, OP, RHS > const &other)
 Overload of the logarithm with base 10 for a ViennaMath compiletime binary expression.
template<typename LHS , typename OP >
rt_unary_expr log10 (ct_unary_expr< LHS, OP > const &other)
 Overload of the logarithm with base 10 for a ViennaMath compiletime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > log10 (rt_unary_expr< InterfaceType > const &other)
 Overload of the logarithm with base 10 for a ViennaMath runtime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > log10 (rt_binary_expr< InterfaceType > const &other)
 Overload of the logarithm with base 10 for a ViennaMath runtime binary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > log10 (rt_expr< InterfaceType > const &other)
 Overload of the logarithm with base 10 for a ViennaMath runtime expression wrapper.
template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_gradient< NumericT >, const InterfaceType *diff_var)
 Implementation of the differentation of a gradient. This is currently not supported, thus an exception is thrown.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > grad (rt_function_symbol< InterfaceType > const &other)
 Overload of the gradient function for a ViennaMath runtime function symbol.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > grad (rt_unary_expr< InterfaceType > const &other)
 Overload of the gradient function for a ViennaMath runtime unary expression.
template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_divergence< NumericT >, const InterfaceType *diff_var)
 Implementation of the differentation of the divergence operator. This is currently not supported, thus an exception is thrown.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > div (rt_expr< InterfaceType > const &other)
 Overload of the divergence function for a ViennaMath runtime expression wrapper.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > div (rt_unary_expr< InterfaceType > const &other)
 Overload of the divergence function for a ViennaMath runtime unary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > div (rt_binary_expr< InterfaceType > const &other)
 Overload of the divergence function for a ViennaMath runtime binary expression.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > div (rt_function_symbol< InterfaceType > const &other)
 Overload of the divergence function for a ViennaMath runtime function symbol.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > laplace (rt_expr< InterfaceType > const &other)
 For convenience, the Laplace operator (divergence of the gradient) is provided as a separate function.
template<typename InterfaceType >
rt_unary_expr< InterfaceType > laplace (rt_function_symbol< InterfaceType > const &other)
 For convenience, the Laplace operator (divergence of the gradient) is provided as a separate function.
template<typename InterfaceType , typename NumericT >
InterfaceType * diff_impl (const InterfaceType *e, op_partial_deriv< NumericT >, const InterfaceType *diff_var)
 Implementation of the differentation of a partial derivative. This is currently not supported, thus an exception is thrown.
template<typename InterfaceType >
InterfaceType * diff_impl (const InterfaceType *e, op_rt_integral< InterfaceType >, const InterfaceType *diff_var)
 Implementation of the differentation of an integral. This is currently not supported, thus an exception is thrown.
template<typename InterfaceType >
InterfaceType * diff_impl (const InterfaceType *e, op_rt_symbolic_integral< InterfaceType >, const InterfaceType *diff_var)
 Implementation of the differentation of an integral with symbolic integration domain. This is currently not supported, thus an exception is thrown.

Detailed Description

Contains the handling of unary operations (overloads for exp(), etc.).