Graph Framework
Loading...
Searching...
No Matches
math.hpp File Reference

Defined basic math functions. More...

#include <cmath>
#include <numbers>
#include "node.hpp"

Go to the source code of this file.

Classes

class  graph::sqrt_node< T, SAFE_MATH >
 A sqrt node. More...
 
class  graph::exp_node< T, SAFE_MATH >
 A exp node. More...
 
class  graph::log_node< T, SAFE_MATH >
 A log node. More...
 
class  graph::pow_node< T, SAFE_MATH >
 An power node. More...
 
class  graph::erf_node< T, SAFE_MATH >
 An error function node. More...
 
class  graph::erfi_node< T, SAFE_MATH >
 An imaginary error function node. More...
 
class  graph::hypot_node< T, SAFE_MATH >
 A hypot node. More...
 
class  graph::copysign_node< T, SAFE_MATH >
 A copysign node. More...
 

Namespaces

namespace  graph
 Name space for graph nodes.
 

Typedefs

template<jit::float_scalar T, bool SAFE_MATH = false>
using graph::shared_sqrt = std::shared_ptr< sqrt_node< T, SAFE_MATH > >
 Convenience type alias for shared sqrt nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using graph::shared_exp = std::shared_ptr< exp_node< T, SAFE_MATH > >
 Convenience type alias for shared exp nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using graph::shared_log = std::shared_ptr< log_node< T, SAFE_MATH > >
 Convenience type alias for shared log nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using graph::shared_pow = std::shared_ptr< pow_node< T, SAFE_MATH > >
 Convenience type alias for shared add nodes.
 
template<std::floating_point T, bool SAFE_MATH = false>
using graph::shared_erf = std::shared_ptr< erf_node< T, SAFE_MATH > >
 Convenience type alias for shared erf nodes.
 
template<jit::complex_scalar T, bool SAFE_MATH = false>
using graph::shared_erfi = std::shared_ptr< erfi_node< T, SAFE_MATH > >
 Convenience type alias for shared erfi nodes.
 
template<std::floating_point T, bool SAFE_MATH = false>
using graph::shared_hypot = std::shared_ptr< hypot_node< T, SAFE_MATH > >
 Convenience type alias for shared hypot nodes.
 
template<std::floating_point T, bool SAFE_MATH = false>
using graph::shared_copysign = std::shared_ptr< copysign_node< T, SAFE_MATH > >
 Convenience type alias for shared copysign nodes.
 

Functions

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::sqrt (shared_leaf< T, SAFE_MATH > x)
 Define sqrt convenience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_sqrt< T, SAFE_MATH > graph::sqrt_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a sqrt node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::exp (shared_leaf< T, SAFE_MATH > x)
 Define exp convenience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_exp< T, SAFE_MATH > graph::exp_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a exp node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::log (shared_leaf< T, SAFE_MATH > x)
 Define log convenience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_log< T, SAFE_MATH > graph::log_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a exp node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::pow (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build power node.
 
template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::pow (const L l, shared_leaf< T, SAFE_MATH > r)
 Build power node.
 
template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::pow (shared_leaf< T, SAFE_MATH > l, const R r)
 Build power node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_pow< T, SAFE_MATH > graph::pow_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a power node.
 
template<std::floating_point T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::erf (shared_leaf< T, SAFE_MATH > x)
 Define erf convenience function.
 
template<std::floating_point T, bool SAFE_MATH = false>
shared_erf< T, SAFE_MATH > graph::erf_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a erf node.
 
template<jit::complex_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::erfi (shared_leaf< T, SAFE_MATH > x)
 Define erfi convenience function.
 
template<jit::complex_scalar T, bool SAFE_MATH = false>
shared_erfi< T, SAFE_MATH > graph::erfi_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a erfi node.
 
template<std::floating_point T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::hypot (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build hypot node.
 
template<std::floating_point T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::hypot (const L l, shared_leaf< T, SAFE_MATH > r)
 Build hypot node.
 
template<std::floating_point T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::hypot (shared_leaf< T, SAFE_MATH > l, const R r)
 Build hypot node.
 
template<std::floating_point T, bool SAFE_MATH = false>
shared_hypot< T, SAFE_MATH > graph::hypot_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a hypot node.
 
template<std::floating_point T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::copysign (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build copysign node.
 
template<std::floating_point T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::copysign (const L l, shared_leaf< T, SAFE_MATH > r)
 Build copysign node.
 
template<std::floating_point T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::copysign (shared_leaf< T, SAFE_MATH > l, const R r)
 Build power node.
 
template<std::floating_point T, bool SAFE_MATH = false>
shared_copysign< T, SAFE_MATH > graph::copysign_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a copysign node.
 

Detailed Description

Defined basic math functions.