18template <
typename _Scalar>
 
   19struct NegativeOrthantTpl : ConstraintSetTpl<_Scalar> {
 
   20  using Scalar = _Scalar;
 
   23  NegativeOrthantTpl() = 
default;
 
   24  NegativeOrthantTpl(
const NegativeOrthantTpl &) = 
default;
 
   25  NegativeOrthantTpl &operator=(
const NegativeOrthantTpl &) = 
default;
 
   26  NegativeOrthantTpl(NegativeOrthantTpl &&) = 
default;
 
   27  NegativeOrthantTpl &operator=(NegativeOrthantTpl &&) = 
default;
 
   29  using Base = ConstraintSetTpl<Scalar>;
 
   30  using ActiveType = 
typename Base::ActiveType;
 
   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)
 
void projection(const ConstVectorRef &z, VectorRef zout) const
Compute projection of variable z onto the constraint set.
 
void computeActiveSet(const ConstVectorRef &z, Eigen::Ref< ActiveType > out) const
The elements of the active set are the components such that .
 
void normalConeProjection(const ConstVectorRef &z, VectorRef zout) const
Compute projection of z onto the normal cone to the set. The default implementation is just .