Exemple #1
0
 SmartPtr<Vector> NLPScalingObject::unapply_grad_obj_scaling_NonConst(
   const SmartPtr<const Vector>& v)
 {
   SmartPtr<Vector> unscaled_v = apply_vector_scaling_x_NonConst(v);
   Number df = unapply_obj_scaling(1.);
   if (df != 1.) {
     unscaled_v->Scal(df);
   }
   return unscaled_v;
 }
Exemple #2
0
 SmartPtr<Vector> NLPScalingObject::unapply_grad_obj_scaling_NonConst(
   const SmartPtr<const Vector>& v)
 {
   DBG_START_METH("NLPScalingObject::unapply_grad_obj_scaling_NonConst", dbg_verbosity);
   SmartPtr<Vector> unscaled_v = apply_vector_scaling_x_NonConst(v);
   Number df = unapply_obj_scaling(1.);
   if (df != 1.) {
     unscaled_v->Scal(df);
   }
   return unscaled_v;
 }
Exemple #3
0
 SmartPtr<const Vector> NLPScalingObject::unapply_grad_obj_scaling(
   const SmartPtr<const Vector>& v)
 {
   Number df = unapply_obj_scaling(1.);
   if (df != 1.) {
     SmartPtr<Vector> unscaled_v = unapply_grad_obj_scaling_NonConst(v);
     return ConstPtr(unscaled_v);
   }
   else {
     SmartPtr<const Vector> scaled_v = apply_vector_scaling_x(v);
     return scaled_v;
   }
 }
Exemple #4
0
 SmartPtr<const Vector> NLPScalingObject::unapply_grad_obj_scaling(
   const SmartPtr<const Vector>& v)
 {
   DBG_START_METH("NLPScalingObject::unapply_grad_obj_scaling", dbg_verbosity);
   Number df = unapply_obj_scaling(1.);
   if (df != 1.) {
     SmartPtr<Vector> unscaled_v = unapply_grad_obj_scaling_NonConst(v);
     return ConstPtr(unscaled_v);
   }
   else {
     SmartPtr<const Vector> scaled_v = apply_vector_scaling_x(v);
     return scaled_v;
   }
 }