WPILibC++ 2027.0.0-alpha-2
Loading...
Searching...
No Matches
slp::detail Namespace Reference

Classes

struct  AbsExpression
 Derived expression type for std::abs(). More...
 
struct  AcosExpression
 Derived expression type for std::acos(). More...
 
class  AdjointExpressionGraph
 This class is an adaptor type that performs value updates of an expression's adjoint graph. More...
 
struct  AsinExpression
 Derived expression type for std::asin(). More...
 
struct  Atan2Expression
 Derived expression type for std::atan2(). More...
 
struct  AtanExpression
 Derived expression type for std::atan(). More...
 
struct  BinaryMinusExpression
 Derived expression type for binary minus operator. More...
 
struct  BinaryPlusExpression
 Derived expression type for binary plus operator. More...
 
struct  ConstExpression
 Derived expression type for constant. More...
 
struct  CosExpression
 Derived expression type for std::cos(). More...
 
struct  CoshExpression
 Derived expression type for std::cosh(). More...
 
struct  DecisionVariableExpression
 Derived expression type for decision variable. More...
 
struct  DivExpression
 Derived expression type for binary division operator. More...
 
struct  ErfExpression
 Derived expression type for std::erf(). More...
 
struct  ExpExpression
 Derived expression type for std::exp(). More...
 
struct  Expression
 An autodiff expression node. More...
 
struct  HypotExpression
 Derived expression type for std::hypot(). More...
 
struct  Log10Expression
 Derived expression type for std::log10(). More...
 
struct  LogExpression
 Derived expression type for std::log(). More...
 
struct  MultExpression
 Derived expression type for binary multiplication operator. More...
 
struct  PowExpression
 Derived expression type for std::pow(). More...
 
struct  SignExpression
 Derived expression type for sign(). More...
 
struct  SinExpression
 Derived expression type for std::sin(). More...
 
struct  SinhExpression
 Derived expression type for std::sinh(). More...
 
struct  SqrtExpression
 Derived expression type for std::sqrt(). More...
 
struct  TanExpression
 Derived expression type for std::tan(). More...
 
struct  TanhExpression
 Derived expression type for std::tanh(). More...
 
struct  UnaryMinusExpression
 Derived expression type for unary minus operator. More...
 

Typedefs

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

Functions

gch::small_vector< Expression * > topological_sort (const ExpressionPtr &root)
 Generate a topological sort of an expression graph from parent to child.
 
void update_values (const gch::small_vector< Expression * > &list)
 Update the values of all nodes in this graph based on the values of their dependent nodes.
 
constexpr void inc_ref_count (Expression *expr)
 Refcount increment for intrusive shared pointer.
 
void dec_ref_count (Expression *expr)
 Refcount decrement for intrusive shared pointer.
 
template<typename T , typename... Args>
static ExpressionPtr make_expression_ptr (Args &&... args)
 Creates an intrusive shared pointer to an expression from the global pool allocator.
 
ExpressionPtr exp (const ExpressionPtr &x)
 std::exp() for Expressions.
 
ExpressionPtr sin (const ExpressionPtr &x)
 std::sin() for Expressions.
 
ExpressionPtr sinh (const ExpressionPtr &x)
 std::sinh() for Expressions.
 
ExpressionPtr sqrt (const ExpressionPtr &x)
 std::sqrt() for Expressions.
 
ExpressionPtr abs (const ExpressionPtr &x)
 std::abs() for Expressions.
 
ExpressionPtr acos (const ExpressionPtr &x)
 std::acos() for Expressions.
 
ExpressionPtr asin (const ExpressionPtr &x)
 std::asin() for Expressions.
 
ExpressionPtr atan (const ExpressionPtr &x)
 std::atan() for Expressions.
 
ExpressionPtr atan2 (const ExpressionPtr &y, const ExpressionPtr &x)
 std::atan2() for Expressions.
 
ExpressionPtr cos (const ExpressionPtr &x)
 std::cos() for Expressions.
 
ExpressionPtr cosh (const ExpressionPtr &x)
 std::cosh() for Expressions.
 
ExpressionPtr erf (const ExpressionPtr &x)
 std::erf() for Expressions.
 
ExpressionPtr hypot (const ExpressionPtr &x, const ExpressionPtr &y)
 std::hypot() for Expressions.
 
ExpressionPtr log (const ExpressionPtr &x)
 std::log() for Expressions.
 
ExpressionPtr log10 (const ExpressionPtr &x)
 std::log10() for Expressions.
 
ExpressionPtr pow (const ExpressionPtr &base, const ExpressionPtr &power)
 std::pow() for Expressions.
 
ExpressionPtr sign (const ExpressionPtr &x)
 sign() for Expressions.
 
ExpressionPtr tan (const ExpressionPtr &x)
 std::tan() for Expressions.
 
ExpressionPtr tanh (const ExpressionPtr &x)
 std::tanh() for Expressions.
 

Variables

constexpr bool USE_POOL_ALLOCATOR = true
 

Typedef Documentation

◆ ExpressionPtr

Typedef for intrusive shared pointer to Expression.

Function Documentation

◆ abs()

ExpressionPtr slp::detail::abs ( const ExpressionPtr & x)
inline

std::abs() for Expressions.

Parameters
xThe argument.

◆ acos()

ExpressionPtr slp::detail::acos ( const ExpressionPtr & x)
inline

std::acos() for Expressions.

Parameters
xThe argument.

◆ asin()

ExpressionPtr slp::detail::asin ( const ExpressionPtr & x)
inline

std::asin() for Expressions.

Parameters
xThe argument.

◆ atan()

ExpressionPtr slp::detail::atan ( const ExpressionPtr & x)
inline

std::atan() for Expressions.

Parameters
xThe argument.

◆ atan2()

ExpressionPtr slp::detail::atan2 ( const ExpressionPtr & y,
const ExpressionPtr & x )
inline

std::atan2() for Expressions.

Parameters
yThe y argument.
xThe x argument.

◆ cos()

ExpressionPtr slp::detail::cos ( const ExpressionPtr & x)
inline

std::cos() for Expressions.

Parameters
xThe argument.

◆ cosh()

ExpressionPtr slp::detail::cosh ( const ExpressionPtr & x)
inline

std::cosh() for Expressions.

Parameters
xThe argument.

◆ dec_ref_count()

void slp::detail::dec_ref_count ( Expression * expr)
inline

Refcount decrement for intrusive shared pointer.

Parameters
exprThe shared pointer's managed object.

◆ erf()

ExpressionPtr slp::detail::erf ( const ExpressionPtr & x)
inline

std::erf() for Expressions.

Parameters
xThe argument.

◆ exp()

ExpressionPtr slp::detail::exp ( const ExpressionPtr & x)
inline

std::exp() for Expressions.

Parameters
xThe argument.

◆ hypot()

ExpressionPtr slp::detail::hypot ( const ExpressionPtr & x,
const ExpressionPtr & y )
inline

std::hypot() for Expressions.

Parameters
xThe x argument.
yThe y argument.

◆ inc_ref_count()

void slp::detail::inc_ref_count ( Expression * expr)
inlineconstexpr

Refcount increment for intrusive shared pointer.

Parameters
exprThe shared pointer's managed object.

◆ log()

ExpressionPtr slp::detail::log ( const ExpressionPtr & x)
inline

std::log() for Expressions.

Parameters
xThe argument.

◆ log10()

ExpressionPtr slp::detail::log10 ( const ExpressionPtr & x)
inline

std::log10() for Expressions.

Parameters
xThe argument.

◆ make_expression_ptr()

template<typename T , typename... Args>
static ExpressionPtr slp::detail::make_expression_ptr ( Args &&... args)
static

Creates an intrusive shared pointer to an expression from the global pool allocator.

Template Parameters
TThe derived expression type.
Parameters
argsConstructor arguments for Expression.

◆ pow()

ExpressionPtr slp::detail::pow ( const ExpressionPtr & base,
const ExpressionPtr & power )
inline

std::pow() for Expressions.

Parameters
baseThe base.
powerThe power.

◆ sign()

ExpressionPtr slp::detail::sign ( const ExpressionPtr & x)
inline

sign() for Expressions.

Parameters
xThe argument.

◆ sin()

ExpressionPtr slp::detail::sin ( const ExpressionPtr & x)
inline

std::sin() for Expressions.

Parameters
xThe argument.

◆ sinh()

ExpressionPtr slp::detail::sinh ( const ExpressionPtr & x)
inline

std::sinh() for Expressions.

Parameters
xThe argument.

◆ sqrt()

ExpressionPtr slp::detail::sqrt ( const ExpressionPtr & x)
inline

std::sqrt() for Expressions.

Parameters
xThe argument.

◆ tan()

ExpressionPtr slp::detail::tan ( const ExpressionPtr & x)
inline

std::tan() for Expressions.

Parameters
xThe argument.

◆ tanh()

ExpressionPtr slp::detail::tanh ( const ExpressionPtr & x)
inline

std::tanh() for Expressions.

Parameters
xThe argument.

◆ topological_sort()

gch::small_vector< Expression * > slp::detail::topological_sort ( const ExpressionPtr & root)
inline

Generate a topological sort of an expression graph from parent to child.

https://en.wikipedia.org/wiki/Topological_sorting

Parameters
rootThe root node of the expression.

◆ update_values()

void slp::detail::update_values ( const gch::small_vector< Expression * > & list)
inline

Update the values of all nodes in this graph based on the values of their dependent nodes.

Parameters
listTopological sort of graph from parent to child.

Variable Documentation

◆ USE_POOL_ALLOCATOR

bool slp::detail::USE_POOL_ALLOCATOR = true
inlineconstexpr