#include <func.h>
Inheritance diagram for MinusFunc:
Public Member Functions | |
MinusFunc (Pointer< Func > f_, Pointer< ostream > out_func_p_=out_out_p, Pointer< ostream > out_func_log_p_=out_log_p) | |
Constructor for a normal func. | |
virtual bool | sparsity_available () const |
To check, whether the sparsity information is set. | |
virtual const SparsityInfo & | get_sparsity () const |
Gives the sparsity information with read-permissions. | |
virtual bool | compute_sparsity_pattern (const vector< dvector > &sample_set) |
double | eval (const UserVector< double > &x) const |
Evaluates the function for a UserVector<double>. | |
void | grad (UserVector< double > &g, const UserVector< double > &x) const |
Evaluates the gradient for a UserVector<double>. | |
dvector | grad (const dvector &x) const |
Computes the (sub)gradient for a UserVector<double>. | |
void | HessMult (UserVector< double > &y, const UserVector< double > &x, const UserVector< double > &z) const |
Computes the product of the Hessian in one point and a UserVector<double>. | |
dvector | HessMult (const dvector &x, const dvector &z) const |
Evaluates the product of the Hessian and a dvector. | |
bool | is_interval_compliant () const |
Indicates, whether the function and it's gradient can be evaluated over an interval. | |
interval< double > | eval (const IntervalVector &x) const |
void | grad (IntervalVector &g, const IntervalVector &x) const |
int | valgrad (interval< double > &val, IntervalVector &g, const IntervalVector &x) const |
virtual void | set_curvature (CurvatureType ct) |
virtual CurvatureType | get_curvature () const |
void | print (ostream &out) const |
Print's the shift-value and the shifted function. | |
Protected Member Functions | |
SparsityInfo & | get_sparsity () |
Protected Attributes | |
Pointer< Func > | f |
The function to wrap. |
this == - *f .
Definition at line 505 of file func.h.
SparsityInfo& MinusFunc::get_sparsity | ( | ) | [inline, protected, virtual] |
Reimplemented from Func.
Definition at line 511 of file func.h.
References f, and Func::sparsity.
Referenced by get_sparsity().
virtual bool MinusFunc::sparsity_available | ( | ) | const [inline, virtual] |
To check, whether the sparsity information is set.
Reimplemented from Func.
Definition at line 524 of file func.h.
References f, and Func::sparsity.
virtual const SparsityInfo& MinusFunc::get_sparsity | ( | ) | const [inline, virtual] |
Gives the sparsity information with read-permissions.
Reimplemented from Func.
Definition at line 526 of file func.h.
References f, get_sparsity(), and Func::sparsity.
virtual bool MinusFunc::compute_sparsity_pattern | ( | const vector< dvector > & | sample_set | ) | [virtual] |
Reimplemented from Func.
double MinusFunc::eval | ( | const UserVector< double > & | x | ) | const [inline, virtual] |
Evaluates the function for a UserVector<double>.
x | The UserVector<double> to evaluate. |
Implements Func.
Definition at line 534 of file func.h.
References f.
void MinusFunc::grad | ( | UserVector< double > & | g, | |
const UserVector< double > & | x | |||
) | const [inline, virtual] |
Evaluates the gradient for a UserVector<double>.
g | The UserVector<double> to store the result in: g = - f'(x). | |
x | The UserVector<double> to evaluate. |
Implements Func.
Definition at line 542 of file func.h.
References f.
Computes the (sub)gradient for a UserVector<double>.
x | The UserVector<double> to compute. |
add_grad(UserVector<double>&, const UserVector<double>&)
add_valgrad(UserVector<double>&, UserVector<double>&, const UserVector<double>&)
Reimplemented from Func.
Definition at line 547 of file func.h.
References f.
void MinusFunc::HessMult | ( | UserVector< double > & | y, | |
const UserVector< double > & | x, | |||
const UserVector< double > & | z | |||
) | const [inline, virtual] |
Computes the product of the Hessian in one point and a UserVector<double>.
y | The UserVector<double> to store the result in. | |
x | The UserVector<double> to compute the Hessian for. | |
z | The UserVector<double> to multiply the Hession with. |
Implements Func.
Definition at line 556 of file func.h.
References f.
Evaluates the product of the Hessian and a dvector.
x | The dvector to evaluate the Hessian for. | |
z | The dvector to multiply with the Hessian. |
Reimplemented from Func.
Definition at line 561 of file func.h.
References f.
bool MinusFunc::is_interval_compliant | ( | ) | const [inline, virtual] |
interval<double> MinusFunc::eval | ( | const IntervalVector & | x | ) | const [inline, virtual] |
void MinusFunc::grad | ( | IntervalVector & | g, | |
const IntervalVector & | x | |||
) | const [inline, virtual] |
int MinusFunc::valgrad | ( | interval< double > & | val, | |
IntervalVector & | g, | |||
const IntervalVector & | x | |||
) | const [inline, virtual] |
virtual void MinusFunc::set_curvature | ( | CurvatureType | ct | ) | [inline, virtual] |
virtual CurvatureType MinusFunc::get_curvature | ( | ) | const [inline, virtual] |
Implements Func.
Definition at line 596 of file func.h.
References Func::CONCAVE, Func::CONVEX, and f.
void MinusFunc::print | ( | ostream & | out | ) | const [inline, virtual] |
Pointer<Func> MinusFunc::f [protected] |
The function to wrap.
Definition at line 509 of file func.h.
Referenced by eval(), get_curvature(), get_sparsity(), grad(), HessMult(), is_interval_compliant(), print(), set_curvature(), sparsity_available(), and valgrad().