Approximate a vector with another vector on lp ball. More...
Static Public Member Functions | |
| static void | ProjectToL0Ball (arma::vec &v, int tau) |
| Project the vector onto the l0 ball with norm tau. More... | |
| static void | ProjectToL1Ball (arma::vec &v, double tau) |
| Project the vector onto the l1 ball with norm tau. More... | |
Approximate a vector with another vector on lp ball.
Currently support l0 ball and l1 ball with specific norm. It can be used in projected gradient method.
Definition at line 27 of file proximal.hpp.
|
static |
Project the vector onto the l0 ball with norm tau.
That is, we try to approximate v with sparse vector w:
| v | Input vector to be approxmated, the output optimal vector is also saved in v. |
| tau | Norm of l0 ball. |
|
static |
Project the vector onto the l1 ball with norm tau.
That is, we will solve for:
| v | Input vector to be approxmated, the output optimal vector is also saved in v. |
| tau | Norm of l1 ball. |
Referenced by Atoms::ProjectedGradientEnhancement().