Home > source > @penlab > phi2_D2.m

phi2_D2

PURPOSE ^

Second derivative of penalty function for augmented Lagrangian function.

SYNOPSIS ^

function [ret] = phi2_D2(obj,t)

DESCRIPTION ^

  Second derivative of penalty function for augmented Lagrangian function.
  function [ret] = phi2_D2(t)  ... second derivative of the penalty function
    input can be double scalar/vector/... whatever,
    return values are of the same type

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001   function [ret] = phi2_D2(obj,t)
0002 %  Second derivative of penalty function for augmented Lagrangian function.
0003 %  function [ret] = phi2_D2(t)  ... second derivative of the penalty function
0004 %    input can be double scalar/vector/... whatever,
0005 %    return values are of the same type
0006 %
0007 
0008   R=obj.allopts.phi_R;
0009 
0010   ret=t;
0011   if (R < 0)
0012     ind = t < R;
0013     ret(ind) = (1+R)^2 ./ (1+2*R-t(ind)).^2;
0014     ret(~ind) = 1.;
0015   else
0016     ind = t < R;
0017     ret(ind) = (1 - t(ind)).^(-2);
0018     ret(~ind) = (1 - R)^(-2);
0019   end
0020 
0021   return;
0022 
0023

Generated on Mon 26-Aug-2019 10:22:08 by m2html © 2005