WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
sleipnir::InequalityConstraints Struct Reference

A vector of inequality constraints of the form cᵢ(x) ≥ 0. More...

#include </home/runner/work/allwpilib/allwpilib/wpimath/src/main/native/thirdparty/sleipnir/include/sleipnir/autodiff/Variable.hpp>

Public Member Functions

 InequalityConstraints (std::initializer_list< InequalityConstraints > inequalityConstraints)
 Concatenates multiple inequality constraints.
 
 InequalityConstraints (const std::vector< InequalityConstraints > &inequalityConstraints)
 Concatenates multiple inequality 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>)
 InequalityConstraints (LHS &&lhs, RHS &&rhs)
 Constructs an inequality constraint from a left and right side.
 
 operator bool ()
 Implicit conversion operator to bool.
 

Public Attributes

wpi::SmallVector< Variableconstraints
 A vector of scalar inequality constraints.
 

Detailed Description

A vector of inequality constraints of the form cᵢ(x) ≥ 0.

Constructor & Destructor Documentation

◆ InequalityConstraints() [1/3]

sleipnir::InequalityConstraints::InequalityConstraints ( std::initializer_list< InequalityConstraints > inequalityConstraints)
inline

Concatenates multiple inequality constraints.

Parameters
inequalityConstraintsThe list of InequalityConstraints to concatenate.

◆ InequalityConstraints() [2/3]

sleipnir::InequalityConstraints::InequalityConstraints ( const std::vector< InequalityConstraints > & inequalityConstraints)
inlineexplicit

Concatenates multiple inequality constraints.

This overload is for Python bindings only.

Parameters
inequalityConstraintsThe list of InequalityConstraints to concatenate.

◆ InequalityConstraints() [3/3]

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>)
sleipnir::InequalityConstraints::InequalityConstraints ( LHS && lhs,
RHS && rhs )
inline

Constructs an inequality constraint from a left and right side.

The standard form for inequality constraints is c(x) ≥ 0. This function takes a constraints of the form lhs ≥ rhs and converts it to lhs - rhs ≥ 0.

Parameters
lhsLeft-hand side.
rhsRight-hand side.

Member Function Documentation

◆ operator bool()

sleipnir::InequalityConstraints::operator bool ( )
inline

Implicit conversion operator to bool.

Member Data Documentation

◆ constraints

wpi::SmallVector<Variable> sleipnir::InequalityConstraints::constraints

A vector of scalar inequality constraints.


The documentation for this struct was generated from the following file: