Home > source > @penlab > ls_fullstep.m

# ls_fullstep

## PURPOSE

rewritten line_search() @ line_search_els.c @ Pennlp v.2.3 & Pennon v.0.9

## SYNOPSIS

function [rRelStep, nFlag]=ls_fullstep(obj, dir)

## DESCRIPTION

     rewritten line_search() @ line_search_els.c @ Pennlp v.2.3 & Pennon v.0.9

     changes in 'obj': xall, ALx, ALdx

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

## SOURCE CODE

    0001 function [rRelStep, nFlag]=ls_fullstep(obj, dir)
    0002 % rewritten line_search() @ line_search_els.c @ Pennlp v.2.3 & Pennon v.0.9
    0003 %
    0004 % changes in 'obj': xall, ALx, ALdx
    0005
    0006   alp = 1;
    0007
    0008   xall0=obj.xall;
    0009   fx=obj.ALx;
    0010   obj.xall = xall0 + alp*dir;
    0011   obj.eval_alx();
    0012     f = obj.ALx;
    0013     nEff = 0;
    0014
    0015       fx=f;
    0016       obj.eval_aldx();
    0017
    0018     obj.lsiter_last=obj.lsiter_last + 1;
    0019   obj.print(3,Inf,'Step length: %f', alp);
    0020
    0021   %return alp;
    0022   rRelStep=alp;
    0023   nFlag = 0;
    0024   return;
    0025
    0026