# SNESLineSearchSetLambda
Sets the linesearch steplength 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESLineSearchSetLambda(SNESLineSearch linesearch, PetscReal lambda)
```

## Input Parameters

- ***linesearch -*** linesearch context
- ***lambda -*** The last steplength.



## Note
This routine is typically used within implementations of `SNESLineSearchApply()`
to set the final steplength.  This routine (and `SNESLineSearchGetLambda()`) were
added in order to facilitate Quasi-Newton methods that use the previous steplength
as an inner scaling parameter.




## See Also
 `SNESLineSearch`, `SNESLineSearchGetLambda()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/linesearch/interface/linesearch.c.html#SNESLineSearchSetLambda">src/snes/linesearch/interface/linesearch.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/linesearch/interface/linesearch.c)


[Index of all SNES routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
