WPILibC++ 2027.0.0-alpha-2
Loading...
Searching...
No Matches
expression.hpp File Reference
#include <stdint.h>
#include <algorithm>
#include <array>
#include <cmath>
#include <memory>
#include <numbers>
#include <utility>
#include <gch/small_vector.hpp>
#include "sleipnir/autodiff/expression_type.hpp"
#include "sleipnir/util/intrusive_shared_ptr.hpp"
#include "sleipnir/util/pool.hpp"

Go to the source code of this file.

Classes

struct  slp::detail::Expression
 An autodiff expression node. More...
 
struct  slp::detail::BinaryMinusExpression< T >
 Derived expression type for binary minus operator. More...
 
struct  slp::detail::BinaryPlusExpression< T >
 Derived expression type for binary plus operator. More...
 
struct  slp::detail::ConstExpression
 Derived expression type for constant. More...
 
struct  slp::detail::DecisionVariableExpression
 Derived expression type for decision variable. More...
 
struct  slp::detail::DivExpression< T >
 Derived expression type for binary division operator. More...
 
struct  slp::detail::MultExpression< T >
 Derived expression type for binary multiplication operator. More...
 
struct  slp::detail::UnaryMinusExpression< T >
 Derived expression type for unary minus operator. More...
 
struct  slp::detail::AbsExpression
 Derived expression type for std::abs(). More...
 
struct  slp::detail::AcosExpression
 Derived expression type for std::acos(). More...
 
struct  slp::detail::AsinExpression
 Derived expression type for std::asin(). More...
 
struct  slp::detail::AtanExpression
 Derived expression type for std::atan(). More...
 
struct  slp::detail::Atan2Expression
 Derived expression type for std::atan2(). More...
 
struct  slp::detail::CosExpression
 Derived expression type for std::cos(). More...
 
struct  slp::detail::CoshExpression
 Derived expression type for std::cosh(). More...
 
struct  slp::detail::ErfExpression
 Derived expression type for std::erf(). More...
 
struct  slp::detail::ExpExpression
 Derived expression type for std::exp(). More...
 
struct  slp::detail::HypotExpression
 Derived expression type for std::hypot(). More...
 
struct  slp::detail::LogExpression
 Derived expression type for std::log(). More...
 
struct  slp::detail::Log10Expression
 Derived expression type for std::log10(). More...
 
struct  slp::detail::PowExpression< T >
 Derived expression type for std::pow(). More...
 
struct  slp::detail::SignExpression
 Derived expression type for sign(). More...
 
struct  slp::detail::SinExpression
 Derived expression type for std::sin(). More...
 
struct  slp::detail::SinhExpression
 Derived expression type for std::sinh(). More...
 
struct  slp::detail::SqrtExpression
 Derived expression type for std::sqrt(). More...
 
struct  slp::detail::TanExpression
 Derived expression type for std::tan(). More...
 
struct  slp::detail::TanhExpression
 Derived expression type for std::tanh(). More...
 

Namespaces

namespace  slp
 
namespace  slp::detail
 

Typedefs

using slp::detail::ExpressionPtr = IntrusiveSharedPtr<Expression>
 Typedef for intrusive shared pointer to Expression.
 

Functions

constexpr void slp::detail::inc_ref_count (Expression *expr)
 Refcount increment for intrusive shared pointer.
 
void slp::detail::dec_ref_count (Expression *expr)
 Refcount decrement for intrusive shared pointer.
 
template<typename T , typename... Args>
static ExpressionPtr slp::detail::make_expression_ptr (Args &&... args)
 Creates an intrusive shared pointer to an expression from the global pool allocator.
 
ExpressionPtr slp::detail::exp (const ExpressionPtr &x)
 std::exp() for Expressions.
 
ExpressionPtr slp::detail::sin (const ExpressionPtr &x)
 std::sin() for Expressions.
 
ExpressionPtr slp::detail::sinh (const ExpressionPtr &x)
 std::sinh() for Expressions.
 
ExpressionPtr slp::detail::sqrt (const ExpressionPtr &x)
 std::sqrt() for Expressions.
 
ExpressionPtr slp::detail::abs (const ExpressionPtr &x)
 std::abs() for Expressions.
 
ExpressionPtr slp::detail::acos (const ExpressionPtr &x)
 std::acos() for Expressions.
 
ExpressionPtr slp::detail::asin (const ExpressionPtr &x)
 std::asin() for Expressions.
 
ExpressionPtr slp::detail::atan (const ExpressionPtr &x)
 std::atan() for Expressions.
 
ExpressionPtr slp::detail::atan2 (const ExpressionPtr &y, const ExpressionPtr &x)
 std::atan2() for Expressions.
 
ExpressionPtr slp::detail::cos (const ExpressionPtr &x)
 std::cos() for Expressions.
 
ExpressionPtr slp::detail::cosh (const ExpressionPtr &x)
 std::cosh() for Expressions.
 
ExpressionPtr slp::detail::erf (const ExpressionPtr &x)
 std::erf() for Expressions.
 
ExpressionPtr slp::detail::hypot (const ExpressionPtr &x, const ExpressionPtr &y)
 std::hypot() for Expressions.
 
ExpressionPtr slp::detail::log (const ExpressionPtr &x)
 std::log() for Expressions.
 
ExpressionPtr slp::detail::log10 (const ExpressionPtr &x)
 std::log10() for Expressions.
 
ExpressionPtr slp::detail::pow (const ExpressionPtr &base, const ExpressionPtr &power)
 std::pow() for Expressions.
 
ExpressionPtr slp::detail::sign (const ExpressionPtr &x)
 sign() for Expressions.
 
ExpressionPtr slp::detail::tan (const ExpressionPtr &x)
 std::tan() for Expressions.
 
ExpressionPtr slp::detail::tanh (const ExpressionPtr &x)
 std::tanh() for Expressions.
 

Variables

constexpr bool slp::detail::USE_POOL_ALLOCATOR = true