WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
Variable.hpp File Reference
#include <algorithm>
#include <concepts>
#include <initializer_list>
#include <type_traits>
#include <utility>
#include <vector>
#include <Eigen/Core>
#include <wpi/SmallVector.h>
#include "sleipnir/autodiff/Expression.hpp"
#include "sleipnir/autodiff/ExpressionGraph.hpp"
#include "sleipnir/util/Assert.hpp"
#include "sleipnir/util/Concepts.hpp"
#include "sleipnir/util/Print.hpp"
#include "sleipnir/util/SymbolExports.hpp"

Go to the source code of this file.

Classes

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

Namespaces

namespace  sleipnir
 
namespace  Eigen
 

Functions

SLEIPNIR_DLLEXPORT Variable sleipnir::abs (const Variable &x)
 std::abs() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::acos (const Variable &x)
 std::acos() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::asin (const Variable &x)
 std::asin() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::atan (const Variable &x)
 std::atan() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::atan2 (const Variable &y, const Variable &x)
 std::atan2() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::cos (const Variable &x)
 std::cos() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::cosh (const Variable &x)
 std::cosh() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::erf (const Variable &x)
 std::erf() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::exp (const Variable &x)
 std::exp() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::hypot (const Variable &x, const Variable &y)
 std::hypot() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::pow (const Variable &base, const Variable &power)
 std::pow() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::log (const Variable &x)
 std::log() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::log10 (const Variable &x)
 std::log10() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::sign (const Variable &x)
 sign() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::sin (const Variable &x)
 std::sin() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::sinh (const Variable &x)
 std::sinh() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::sqrt (const Variable &x)
 std::sqrt() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::tan (const Variable &x)
 std::tan() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::tanh (const Variable &x)
 std::tanh() for Variables.
 
SLEIPNIR_DLLEXPORT Variable sleipnir::hypot (const Variable &x, const Variable &y, const Variable &z)
 std::hypot() for Variables.
 
template<typename LHS , typename RHS >
requires (ScalarLike<std::decay_t<LHS>> || MatrixLike<std::decay_t<LHS>>) && (ScalarLike<std::decay_t<RHS>> || MatrixLike<std::decay_t<RHS>>) && (!std::same_as<std::decay_t<LHS>, double> || !std::same_as<std::decay_t<RHS>, double>)
wpi::SmallVector< Variablesleipnir::MakeConstraints (LHS &&lhs, RHS &&rhs)
 Make a list of constraints.
 
template<typename LHS , typename RHS >
requires (ScalarLike<std::decay_t<LHS>> || MatrixLike<std::decay_t<LHS>>) && (ScalarLike<std::decay_t<RHS>> || MatrixLike<std::decay_t<RHS>>) && (!std::same_as<std::decay_t<LHS>, double> || !std::same_as<std::decay_t<RHS>, double>)
EqualityConstraints sleipnir::operator== (LHS &&lhs, RHS &&rhs)
 Equality operator that returns an equality constraint for two Variables.
 
template<typename LHS , typename RHS >
requires (ScalarLike<std::decay_t<LHS>> || MatrixLike<std::decay_t<LHS>>) && (ScalarLike<std::decay_t<RHS>> || MatrixLike<std::decay_t<RHS>>) && (!std::same_as<std::decay_t<LHS>, double> || !std::same_as<std::decay_t<RHS>, double>)
InequalityConstraints sleipnir::operator< (LHS &&lhs, RHS &&rhs)
 Less-than comparison operator that returns an inequality constraint for two Variables.
 
template<typename LHS , typename RHS >
requires (ScalarLike<std::decay_t<LHS>> || MatrixLike<std::decay_t<LHS>>) && (ScalarLike<std::decay_t<RHS>> || MatrixLike<std::decay_t<RHS>>) && (!std::same_as<std::decay_t<LHS>, double> || !std::same_as<std::decay_t<RHS>, double>)
InequalityConstraints sleipnir::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<std::decay_t<LHS>> || MatrixLike<std::decay_t<LHS>>) && (ScalarLike<std::decay_t<RHS>> || MatrixLike<std::decay_t<RHS>>) && (!std::same_as<std::decay_t<LHS>, double> || !std::same_as<std::decay_t<RHS>, double>)
InequalityConstraints sleipnir::operator> (LHS &&lhs, RHS &&rhs)
 Greater-than comparison operator that returns an inequality constraint for two Variables.
 
template<typename LHS , typename RHS >
requires (ScalarLike<std::decay_t<LHS>> || MatrixLike<std::decay_t<LHS>>) && (ScalarLike<std::decay_t<RHS>> || MatrixLike<std::decay_t<RHS>>) && (!std::same_as<std::decay_t<LHS>, double> || !std::same_as<std::decay_t<RHS>, double>)
InequalityConstraints sleipnir::operator>= (LHS &&lhs, RHS &&rhs)
 Greater-than-or-equal-to comparison operator that returns an inequality constraint for two Variables.
 

Variables

class SLEIPNIR_DLLEXPORT sleipnir::Hessian
 
class SLEIPNIR_DLLEXPORT sleipnir::Jacobian