Add the PGD algorithm. Fix #4 issue.