WPILibC++ 2027.0.0-alpha-2
Loading...
Searching...
No Matches
variable.hpp File Reference
#include <algorithm>
#include <concepts>
#include <initializer_list>
#include <source_location>
#include <type_traits>
#include <utility>
#include <vector>
#include <Eigen/Core>
#include <gch/small_vector.hpp>
#include "sleipnir/autodiff/expression.hpp"
#include "sleipnir/autodiff/expression_graph.hpp"
#include "sleipnir/util/assert.hpp"
#include "sleipnir/util/concepts.hpp"
#include "sleipnir/util/symbol_exports.hpp"
#include "sleipnir/util/print.hpp"

Go to the source code of this file.

Classes

class  slp::Variable
 An autodiff variable pointing to an expression node. More...
 
struct  slp::EqualityConstraints
 A vector of equality constraints of the form cₑ(x) = 0. More...
 
struct  slp::InequalityConstraints
 A vector of inequality constraints of the form cᵢ(x) ≥ 0. More...
 
struct  Eigen::NumTraits< slp::Variable >
 NumTraits specialization that allows instantiating Eigen types with Variable. More...
 

Namespaces

namespace  slp
 
namespace  slp::detail
 
namespace  Eigen
 

Functions

SLEIPNIR_DLLEXPORT Variable slp::abs (const Variable &x)
 std::abs() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::acos (const Variable &x)
 std::acos() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::asin (const Variable &x)
 std::asin() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::atan (const Variable &x)
 std::atan() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::atan2 (const Variable &y, const Variable &x)
 std::atan2() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::cos (const Variable &x)
 std::cos() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::cosh (const Variable &x)
 std::cosh() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::erf (const Variable &x)
 std::erf() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::exp (const Variable &x)
 std::exp() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::hypot (const Variable &x, const Variable &y)
 std::hypot() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::pow (const Variable &base, const Variable &power)
 std::pow() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::log (const Variable &x)
 std::log() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::log10 (const Variable &x)
 std::log10() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::sign (const Variable &x)
 sign() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::sin (const Variable &x)
 std::sin() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::sinh (const Variable &x)
 std::sinh() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::sqrt (const Variable &x)
 std::sqrt() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::tan (const Variable &x)
 std::tan() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::tanh (const Variable &x)
 std::tanh() for Variables.
 
SLEIPNIR_DLLEXPORT Variable slp::hypot (const Variable &x, const Variable &y, const Variable &z)
 std::hypot() for Variables.
 
template<typename LHS , typename RHS >
requires (ScalarLike<LHS> || MatrixLike<LHS>) && (ScalarLike<RHS> || MatrixLike<RHS>) && (SleipnirType<LHS> || SleipnirType<RHS>)
gch::small_vector< Variableslp::make_constraints (LHS &&lhs, RHS &&rhs)
 Make a list of constraints.
 
template<typename LHS , typename RHS >
requires (ScalarLike<LHS> || MatrixLike<LHS>) && (ScalarLike<RHS> || MatrixLike<RHS>) && (SleipnirType<LHS> || SleipnirType<RHS>)
EqualityConstraints slp::operator== (LHS &&lhs, RHS &&rhs)
 Equality operator that returns an equality constraint for two Variables.
 
template<typename LHS , typename RHS >
requires (ScalarLike<LHS> || MatrixLike<LHS>) && (ScalarLike<RHS> || MatrixLike<RHS>) && (SleipnirType<LHS> || SleipnirType<RHS>)
InequalityConstraints slp::operator< (LHS &&lhs, RHS &&rhs)
 Less-than comparison operator that returns an inequality constraint for two Variables.
 
template<typename LHS , typename RHS >
requires (ScalarLike<LHS> || MatrixLike<LHS>) && (ScalarLike<RHS> || MatrixLike<RHS>) && (SleipnirType<LHS> || SleipnirType<RHS>)
InequalityConstraints slp::operator<= (LHS &&lhs, RHS &&rhs)
 Less-than-or-equal-to comparison operator that returns an inequality constraint for two Variables.
 
template<typename LHS , typename RHS >
requires (ScalarLike<LHS> || MatrixLike<LHS>) && (ScalarLike<RHS> || MatrixLike<RHS>) && (SleipnirType<LHS> || SleipnirType<RHS>)
InequalityConstraints slp::operator> (LHS &&lhs, RHS &&rhs)
 Greater-than comparison operator that returns an inequality constraint for two Variables.
 
template<typename LHS , typename RHS >
requires (ScalarLike<LHS> || MatrixLike<LHS>) && (ScalarLike<RHS> || MatrixLike<RHS>) && (SleipnirType<LHS> || SleipnirType<RHS>)
InequalityConstraints slp::operator>= (LHS &&lhs, RHS &&rhs)
 Greater-than-or-equal-to comparison operator that returns an inequality constraint for two Variables.
 

Variables

template<int UpLo = Eigen::Lower | Eigen::Upper>
class SLEIPNIR_DLLEXPORT slp::Hessian
 
class SLEIPNIR_DLLEXPORT slp::Jacobian