stator
A math, geometry, and utility library
Classes | Namespaces | Functions
unary_ops.hpp File Reference

Go to the source code of this file.

Classes

struct  sym::detail::Absolute
 
struct  sym::detail::Arbsign
 
struct  sym::detail::Cosine
 
struct  sym::detail::Exp
 
struct  sym::detail::Log
 
struct  sym::detail::Sine
 
struct  sym::UnaryOp< Arg, Op >
 Symbolic representation of a unary operator (i.e., sin(x)). More...
 

Namespaces

 sym
 The stator symbolic math library.
 
 sym::detail
 Namespace containing the details of the implmentation for general stator components.
 

Functions

int sym::abs (int a)
 
long sym::abs (long a)
 
long long sym::abs (long long a)
 
float sym::abs (float a)
 
double sym::abs (double a)
 
long double sym::abs (long double a)
 
template<class T >
sym::abs (std::complex< T > a)
 
template<class Arg , typename = typename std::enable_if<IsSymbolic<Arg>::value>::type>
auto sym::abs (const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Absolute >(arg)))
 
template<class Arg >
auto sym::arbsign (const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Arbsign >(arg)))
 
float sym::cos (float a)
 
double sym::cos (double a)
 
long double sym::cos (long double a)
 
template<class T >
std::complex< T > sym::cos (std::complex< T > a)
 
template<class Arg , typename = typename std::enable_if<IsSymbolic<Arg>::value>::type>
auto sym::cos (const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Cosine >(arg)))
 
template<class Var , class Arg >
auto sym::derivative (const UnaryOp< Arg, detail::Sine > &f, Var x) -> STATOR_AUTORETURN(derivative(f._arg, x) *sym::cos(f._arg))
 
template<class Var , class Arg >
auto sym::derivative (const UnaryOp< Arg, detail::Cosine > &f, Var x) -> STATOR_AUTORETURN(-derivative(f._arg, x) *sym::sin(f._arg))
 
template<class Var , class Arg >
auto sym::derivative (const UnaryOp< Arg, detail::Exp > &f, Var x) -> STATOR_AUTORETURN(derivative(f._arg, x) *f)
 
template<class Var , class Arg >
auto sym::derivative (const UnaryOp< Arg, detail::Log > &f, Var x) -> STATOR_AUTORETURN(derivative(f._arg, x)/f._arg)
 
template<class Var , class Arg >
auto sym::derivative (const UnaryOp< Arg, detail::Absolute > &f, Var x) -> STATOR_AUTORETURN(derivative(f._arg, x) *sym::abs(f._arg)/f._arg)
 
template<class Var , class Arg >
auto sym::derivative (const UnaryOp< Arg, detail::Arbsign > &f, Var x) -> STATOR_AUTORETURN(derivative(f._arg, x) *sym::arbsign(Unity()))
 
float sym::exp (float a)
 
double sym::exp (double a)
 
long double sym::exp (long double a)
 
template<class T >
std::complex< T > sym::exp (std::complex< T > a)
 
template<class Arg , typename = typename std::enable_if<IsSymbolic<Arg>::value>::type>
auto sym::exp (const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Exp >(arg)))
 
float sym::log (float a)
 
double sym::log (double a)
 
long double sym::log (long double a)
 
template<class T >
std::complex< T > sym::log (std::complex< T > a)
 
template<class Arg , typename = typename std::enable_if<IsSymbolic<Arg>::value>::type>
auto sym::log (const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Log >(arg)))
 
float sym::sin (float a)
 
double sym::sin (double a)
 
long double sym::sin (long double a)
 
template<class T >
std::complex< T > sym::sin (std::complex< T > a)
 
template<class Arg , typename = typename std::enable_if<IsSymbolic<Arg>::value>::type>
auto sym::sin (const Arg &arg) -> STATOR_AUTORETURN((UnaryOp< decltype(store(arg)), detail::Sine >(arg)))
 
template<class Var , class Arg1 , class Arg2 , class Op >
auto sym::sub (const UnaryOp< Arg1, Op > &f, const Relation< Var, Arg2 > &x) -> STATOR_AUTORETURN(Op::apply(sub(f._arg, x)))