stator
A math, geometry, and utility library
Namespaces | Macros | Functions
integrate.hpp File Reference

Integration support for the stator::symbolic library. More...

#include "stator/exception.hpp"
#include "stator/config.hpp"

Go to the source code of this file.

Namespaces

 sym
 The stator symbolic math library.
 

Macros

#define IS_CONSTANT(f, Var)   std::is_same<decltype(store(derivative(f, Var()))), Null>::value
 

Functions

template<class T , class Var >
auto sym::integrate (const T &a, Var) -> typename std::enable_if< std::is_same< decltype(store(derivative(a, Var()))), Null >::value, decltype(store(a *Var()))>::type
 Integration of any constant/independent expression. More...
 
template<class ... VarArgs, class LHS , class RHS >
auto sym::integrate (const AddOp< LHS, RHS > &a, Var< VarArgs... > x) -> STATOR_AUTORETURN(integrate(a._l, x)+integrate(a._r, x))
 Distributive integration over addition. More...
 
template<class ... VarArgs1, class ... VarArgs2, typename = typename enable_if_var_in<Var<VarArgs1...>, Var<VarArgs2...> >::type>
auto sym::integrate (Var< VarArgs1... >, Var< VarArgs2... >) -> STATOR_AUTORETURN((C< 1, 2 >() *pow< 2 >(typename variable_combine< Var< VarArgs1... >, Var< VarArgs2... > >::type())))
 Integration of $x$ by $x$. More...
 
template<class ... VarArgs1, class ... VarArgs2, std::intmax_t Power, typename = typename enable_if_var_in<Var<VarArgs1...>, Var<VarArgs2...> >::type>
auto sym::integrate (const PowerOp< Var< VarArgs1... >, C< Power > > &a, Var< VarArgs2... >) -> STATOR_AUTORETURN((C< 1, Power+1 >() *pow(typename variable_combine< Var< VarArgs1... >, Var< VarArgs2... > >::type(), C< Power+1 >())))
 Integration of $x^n$ by $x$. More...
 

Macro Definition Documentation

◆ IS_CONSTANT

#define IS_CONSTANT (   f,
  Var 
)    std::is_same<decltype(store(derivative(f, Var()))), Null>::value

Definition at line 31 of file integrate.hpp.