18template <
typename _Scalar>
32 void projection(
const ConstVectorRef &z, VectorRef zout)
const {
33 zout = z.cwiseMin(
static_cast<Scalar>(0.));
37 zout = z.cwiseMax(
static_cast<Scalar>(0.));
42 Eigen::Ref<ActiveType> out)
const {
43 out.array() = (z.array() >
static_cast<Scalar>(0.));
47template <
typename Scalar>
48using NegativeOrthant PROXSUITE_NLP_DEPRECATED_MESSAGE(
49 "Use NegativeOrthantTpl<T> instead") = NegativeOrthantTpl<Scalar>;
51#ifdef PROXSUITE_NLP_ENABLE_TEMPLATE_INSTANTIATION
52extern template struct PROXSUITE_NLP_EXPLICIT_INSTANTIATION_DECLARATION_DLLAPI
53 NegativeOrthantTpl<context::Scalar>;
#define PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)
Base constraint set type.
Eigen::Matrix< bool, Eigen::Dynamic, 1 > ActiveType
Negative orthant, for constraints .
typename Base::ActiveType ActiveType
NegativeOrthantTpl(const NegativeOrthantTpl &)=default
NegativeOrthantTpl(NegativeOrthantTpl &&)=default
NegativeOrthantTpl()=default
void projection(const ConstVectorRef &z, VectorRef zout) const
Compute projection of variable z onto the constraint set.
NegativeOrthantTpl & operator=(const NegativeOrthantTpl &)=default
void computeActiveSet(const ConstVectorRef &z, Eigen::Ref< ActiveType > out) const
The elements of the active set are the components such that .
NegativeOrthantTpl & operator=(NegativeOrthantTpl &&)=default
void normalConeProjection(const ConstVectorRef &z, VectorRef zout) const
Compute projection of z onto the normal cone to the set. The default implementation is just .