Skip to content
Merged
9 changes: 5 additions & 4 deletions PEPit/primitive_steps/exact_linesearch_step.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from PEPit.point import Point


def exact_linesearch_step(x0, f, directions):
def exact_linesearch_step(x0, f, directions, name='new_x'):
"""
This routine outputs some :math:`x` by *mimicking* an exact line/span search in specified directions.
It is used for instance in ``PEPit.examples.unconstrained_convex_minimization.wc_gradient_exact_line_search``
Expand Down Expand Up @@ -63,6 +63,7 @@ def exact_linesearch_step(x0, f, directions):
x0 (Point): the starting point.
f (Function): the function on which the (sub)gradient will be evaluated.
directions (List of Points): the list of all directions required to be orthogonal to the (sub)gradient of x.
name (Str): the name of the point we arrive to.

Returns:
x (Point): such that all vectors in directions are orthogonal to the (sub)gradient of f at x.
Expand All @@ -72,18 +73,18 @@ def exact_linesearch_step(x0, f, directions):
"""

# Instantiate a Point
x = Point()
x = Point(name=name)

# Define gradient and function value of f on x
gx, fx = f.oracle(x)

# Add constraints
constraint = ((x - x0) * gx == 0)
constraint.set_name("exact_linesearch({})_on_{}".format(f.get_name(), x0.get_name()))
constraint.set_name("exact_linesearch({})_to_{}_from_{}".format(f.get_name(), x.get_name(), x0.get_name()))
f.add_constraint(constraint)
for d in directions:
constraint = (d * gx == 0)
constraint.set_name("exact_linesearch({})_on_{}_in_direction_{}".format(f.get_name(), x0.get_name(), d.get_name()))
constraint.set_name("exact_linesearch({})_to_{}_from_{}_in_direction_{}".format(f.get_name(), x.get_name(), x0.get_name(), d.get_name()))
f.add_constraint(constraint)

# Return triplet of points
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,15 @@ PEPit supports the following [operator classes](https://pepit.readthedocs.io/en/

## Contributors

### Creators
### Creators, internal contributors and maintainers

This toolbox has been created by

- [**Baptiste Goujaud**](https://www.linkedin.com/in/baptiste-goujaud-b60060b3/)
- [**Céline Moucer**](https://cmoucer.github.io)
- [**Julien Hendrickx**](https://perso.uclouvain.be/julien.hendrickx/index.html)
- [**François Glineur**](https://perso.uclouvain.be/francois.glineur/)
- [**Adrien Taylor**](https://adrientaylor.github.io/)
- [**Aymeric Dieuleveut**](http://www.cmap.polytechnique.fr/~aymeric.dieuleveut/)
- [**Baptiste Goujaud**](https://bgoujaud.github.io/) (creator and maintainer)
- [**Céline Moucer**](https://cmoucer.github.io) (creator)
- [**Julien Hendrickx**](https://perso.uclouvain.be/julien.hendrickx/index.html) (creator)
- [**François Glineur**](https://perso.uclouvain.be/francois.glineur/) (creator)
- [**Adrien Taylor**](https://adrientaylor.github.io/) (creator and maintainer)
- [**Aymeric Dieuleveut**](http://www.cmap.polytechnique.fr/~aymeric.dieuleveut/) (creator and maintainer)
- [**Daniel Berg Thomsen**](https://bergthomsen.com/) (internal contributor)

<p align="center">
<a href="https://www.inria.fr" style="margin: 0 40px;">
Expand All @@ -297,6 +296,7 @@ This toolbox has been created by
</a>
</p>


### External contributions

All external contributions are welcome.
Expand Down
3 changes: 2 additions & 1 deletion docs/source/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Tutorials
:caption: Contents:

Finding worst-case guarantees <notebooks_folder/PEPit_demo.ipynb>
Extracting a proof <notebooks_folder/PEPit_demo_extracting_a_proof.ipynb>
Extracting a worst-case example <notebooks_folder/PEPit_demo_extract_worst_case_examples.ipynb>
Extracting a proof <notebooks_folder/PEPit_demo_extracting_a_proof.ipynb>
Designing an algorithm <notebooks_folder/PEPit_demo_algorithm_design.ipynb>
1 change: 1 addition & 0 deletions docs/source/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ What's new in PEPit
whatsnew/0.3.3
whatsnew/0.4.0
whatsnew/0.5.0
whatsnew/0.5.1
12 changes: 12 additions & 0 deletions docs/source/whatsnew/0.5.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
What's new in PEPit 0.5.1
=========================

New demo:
---------

- The file `ressources/demo/PEPit_demo_algorithm_design.ipynb` contains examples for algorithm design with PEPit.

Fixes:
------

- Improved constraint naming within the exact linesearch procedure.
2,646 changes: 2,646 additions & 0 deletions ressources/demo/PEPit_demo_algorithm_design.ipynb

Large diffs are not rendered by default.

Loading