Unitary function optimizer, used to hold values during the optimization. More...
#include <unitary.h>
Public Member Functions | |
UnitaryFunction (int q, bool max) | |
Constructor. More... | |
virtual | ~UnitaryFunction () |
Destructor. | |
virtual void | setW (const arma::cx_mat &W) |
Set matrix. | |
arma::cx_mat | getW () const |
Get matrix. | |
int | getq () const |
Get q. | |
double | getf () const |
Get function value. | |
int | getsign () const |
Get sign. | |
virtual UnitaryFunction * | copy () const =0 |
Copy constructor. | |
virtual double | cost_func (const arma::cx_mat &W)=0 |
Evaluate cost function. | |
virtual arma::cx_mat | cost_der (const arma::cx_mat &W)=0 |
Evaluate derivative of cost function. | |
virtual void | cost_func_der (const arma::cx_mat &W, double &f, arma::cx_mat &der)=0 |
Evaluate cost function and its derivative. | |
virtual std::string | legend () const |
Get status legend. More... | |
virtual std::string | status (bool lfmt=false) |
Print status information, possibly in a longer format. More... | |
virtual bool | converged () |
Check convergence. More... | |
Protected Attributes | |
arma::cx_mat | W |
Present matrix. | |
double | f |
Present value. | |
int | q |
Order in W. | |
int | sign |
Maximization or minimization? | |
Unitary function optimizer, used to hold values during the optimization.
UnitaryFunction::UnitaryFunction | ( | int | q, |
bool | max | ||
) |
Constructor.
Maximize or minimize?
|
virtual |
Check convergence.
Dummy default function
|
virtual |
|
virtual |
Print status information, possibly in a longer format.
Dummy default function
Reimplemented in Brockett.