ROL
Classes | Namespaces | Macros
ROL_Zakharov.hpp File Reference

Contains definitions for the Zakharov function as evaluated using only the ROL::Vector interface. More...

#include "ROL_TestProblem.hpp"
#include "ROL_StdVector.hpp"

Go to the source code of this file.

Classes

class  ROL::ZOO::Objective_Zakharov< Real >
 Zakharov function. More...
 
class  ROL::ZOO::getZakharov< Real >
 

Namespaces

 ROL
 
 ROL::ZOO
 

Macros

#define ROL_ZAKHAROV_HPP
 

Detailed Description

Contains definitions for the Zakharov function as evaluated using only the ROL::Vector interface.

This is a nice example not only because the gradient, Hessian, and inverse Hessian are easy to derive, but because they only require dot products, meaning this code can be used with any class that inherits from ROL::Vector.

Objective function:

\[f(\mathbf{x}) = \mathbf{x}^\top\mathbf{x} + \frac{1}{4}(\mathbf{k}^\top \mathbf{x})^2 + \frac{1}{16}(\mathbf{k}^\top \mathbf{x})^4 \]

Where \(\mathbf{k}=(1,\cdots,n)\)

Gradient:

\[ g=\nabla f(\mathbf{x}) = 2\mathbf{x} + \frac{1}{4}\left(2(\mathbf{k}^\top\mathbf{x})+(\mathbf{k}^\top\mathbf{x})^3\right)\mathbf{k} \]

Hessian:

\[ H=\nabla^2 f(\mathbf{x}) = 2 I + \frac{1}{4}[2+3(\mathbf{k}^\top\mathbf{x})^2]\mathbf{kk}^\top \]

The Hessian is a multiple of the identity plus a rank one symmetric matrix, therefore the action of the inverse Hessian can be performed using the Sherman-Morrison formula.

\[ H^{-1}\mathbf{v} = \frac{1}{2}\mathbf{v}-\frac{(\mathbf{k}^\top\mathbf{v})} {\frac{16}{2+3(\mathbf{k}^\top\mathbf{x})^2}+2\mathbf{k^\top}\mathbf{k}}\mathbf{k} \]

Author
Created by G. von Winckel

Definition in file ROL_Zakharov.hpp.

Macro Definition Documentation

#define ROL_ZAKHAROV_HPP

Definition at line 50 of file ROL_Zakharov.hpp.