pyproximal.utils.bilinear.BilinearOperator#
- class pyproximal.utils.bilinear.BilinearOperator[source]#
Common interface for bilinear operator of a function.
Bilinear operator template class. A user must subclass it and implement the following methods:
gradx: a method evaluating the gradient over \(\mathbf{x}\): \(\nabla_x H\)grady: a method evaluating the gradient over \(\mathbf{y}\): \(\nabla_y H\)grad: a method returning the stacked gradient vector over \(\mathbf{x},\mathbf{y}\): \([\nabla_x H\), [nabla_y H]`lx: Lipschitz constant of \(\nabla_y H\)ly: Lipschitz constant of \(\nabla_x H\)
Three additional methods (
updatex,updatey, andupdatexy) are provided to update either the \(\mathbf{x}\) and \(\mathbf{y}\) internal variables (or both). It is user responsability to choose when to invoke such methods (i.e., when to update the internal variables).Notes
A bilinear operator is defined as a differentiable nonlinear function \(H(x,y)\) that is linear in each of its components indipendently, i.e, \(\mathbf{H_x}(y)\mathbf{x}\) and \(\mathbf{H_y}(y)\mathbf{x}\).
Methods
__init__()grad(x_or_y)gradx(x)grady(y)lx(x)ly(y)updatex(x)Update x variable (to be used to update the internal variable x)
updatexy(x_and_y)Update x and y variables (to be used to update both internal variables)
updatey(y)Update y variable (to be used to update the internal variable y)