#include <decomp.h>
Inheritance diagram for SplitFunc:
Public Member Functions | |
SplitFunc (const Pointer< Func > &orig_, const ivector &indices_, const dvector &point_, const vector< int > &ignore_=vector< int >(0)) | |
Constructor. | |
SplitFunc (const Pointer< Func > &orig_, const ivector &indices_, const dvector &point_, const set< int > &ignore_, Pointer< SparsityInfo > si=NULL) | |
void | set_point (const UserVector< double > &x) const |
Sets point to value of x for variables, we represent and don't ignore. | |
double | eval (const UserVector< double > &x) const |
Computes the value of this function for a UserVector<double>. | |
void | grad (UserVector< double > &g, const UserVector< double > &x) const |
Computes the (sub)gradient for a UserVector<double>. | |
void | HessMult (UserVector< double > &y, const UserVector< double > &x, const UserVector< double > &z) const |
Evaluates the product of the Hessian and a UserVector<double>. | |
bool | is_interval_compliant () const |
Indicates, whether the function and it's gradient can be evaluated over an interval. | |
void | set_point (IntervalVector &bigx, const IntervalVector &x) const |
interval< double > | eval (const IntervalVector &x) const |
void | grad (IntervalVector &g, const IntervalVector &x) const |
int | valgrad (interval< double > &val, IntervalVector &y, const IntervalVector &x) const |
virtual void | set_curvature (CurvatureType ct) |
virtual CurvatureType | get_curvature () const |
void | print (ostream &out) const |
Print's out the dimension. | |
Public Attributes | |
vector< bool > | ignore |
Variables, we relate to, but we ignore at evaluation. | |
Private Attributes | |
const Pointer< Func > | orig |
Pointer to original function. | |
ivector | indices |
The indices of the variables of original function, this function relates on. | |
dvector | point |
A point, we can use to evaluate the original function. | |
Func::CurvatureType | curv_type |
Definition at line 111 of file decomp.h.
SplitFunc::SplitFunc | ( | const Pointer< Func > & | orig_, | |
const ivector & | indices_, | |||
const dvector & | point_, | |||
const vector< int > & | ignore_ = vector<int>(0) | |||
) | [inline] |
Constructor.
orig_ | The original function. | |
indices_ | The set of indices, for which this function represents the original one. | |
point_ | The point, where we take the other values from. | |
ignore_ | Indices of variables (of this function, not the original one) which should be ignored. |
void SplitFunc::set_point | ( | const UserVector< double > & | x | ) | const [inline] |
Sets point to value of x for variables, we represent and don't ignore.
x | The UserVector to take to values from. |
Definition at line 154 of file decomp.h.
References ignore, indices, point, and UserVector< Type >::size().
Referenced by eval(), grad(), HessMult(), and valgrad().
double SplitFunc::eval | ( | const UserVector< double > & | x | ) | const [inline, virtual] |
Computes the value of this function for a UserVector<double>.
Abstract.
x | The UserVector<double> to compute the value for. |
Implements Func.
Definition at line 159 of file decomp.h.
References orig, point, and set_point().
void SplitFunc::grad | ( | UserVector< double > & | g, | |
const UserVector< double > & | x | |||
) | const [inline, virtual] |
Computes the (sub)gradient for a UserVector<double>.
Abstract.
g | The UserVector<double> to store the result in. | |
x | The UserVector<double> to compute the gradient for. |
valgrad(double&, UserVector<double>&, const UserVector<double>&)
add_grad(UserVector<double>&, UserVector<double>&)
add_valgrad(double&, UserVector<double>&, UserVector<double>&)
Implements Func.
Definition at line 165 of file decomp.h.
References ignore, indices, orig, point, set_point(), and UserVector< Type >::size().
void SplitFunc::HessMult | ( | UserVector< double > & | y, | |
const UserVector< double > & | x, | |||
const UserVector< double > & | z | |||
) | const [inline, virtual] |
Evaluates the product of the Hessian and a UserVector<double>.
Abstract.
y | The UserVector<double> to store the result in: ![]() | |
x | The UserVector<double> to evaluate the Hessian for. | |
z | The UserVector<double> to multiply with the Hessian. |
Implements Func.
Definition at line 176 of file decomp.h.
References ignore, indices, orig, point, set_point(), DenseVector< Type >::SetElement(), and UserVector< Type >::size().
bool SplitFunc::is_interval_compliant | ( | ) | const [inline, virtual] |
void SplitFunc::set_point | ( | IntervalVector & | bigx, | |
const IntervalVector & | x | |||
) | const [inline] |
Definition at line 193 of file decomp.h.
References ignore, indices, and UserVector< Type >::size().
interval<double> SplitFunc::eval | ( | const IntervalVector & | x | ) | const [inline, virtual] |
void SplitFunc::grad | ( | IntervalVector & | g, | |
const IntervalVector & | x | |||
) | const [inline, virtual] |
Reimplemented from Func.
Definition at line 204 of file decomp.h.
References ignore, indices, orig, point, set_point(), and UserVector< Type >::size().
int SplitFunc::valgrad | ( | interval< double > & | val, | |
IntervalVector & | y, | |||
const IntervalVector & | x | |||
) | const [inline, virtual] |
Reimplemented from Func.
Definition at line 213 of file decomp.h.
References ignore, indices, orig, point, set_point(), and UserVector< Type >::size().
virtual void SplitFunc::set_curvature | ( | CurvatureType | ct | ) | [inline, virtual] |
virtual CurvatureType SplitFunc::get_curvature | ( | ) | const [inline, virtual] |
void SplitFunc::print | ( | ostream & | out | ) | const [virtual] |
const Pointer<Func> SplitFunc::orig [private] |
Pointer to original function.
Definition at line 115 of file decomp.h.
Referenced by eval(), grad(), HessMult(), is_interval_compliant(), SplitFunc(), and valgrad().
ivector SplitFunc::indices [private] |
The indices of the variables of original function, this function relates on.
Definition at line 119 of file decomp.h.
Referenced by grad(), HessMult(), set_point(), and valgrad().
dvector SplitFunc::point [mutable, private] |
A point, we can use to evaluate the original function.
Definition at line 123 of file decomp.h.
Referenced by eval(), grad(), HessMult(), set_point(), and valgrad().
Func::CurvatureType SplitFunc::curv_type [private] |
vector<bool> SplitFunc::ignore |
Variables, we relate to, but we ignore at evaluation.
Definition at line 130 of file decomp.h.
Referenced by grad(), HessMult(), set_point(), SplitFunc(), and valgrad().