SplitFunc Class Reference
Represents a function, which relates only to a subset of the variables of another function.
More...
#include <decomp.h>
List of all members.
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>.
|
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 |
Detailed Description
Represents a function, which relates only to a subset of the variables of another function.
Definition at line 108 of file decomp.h.
Constructor & Destructor Documentation
SplitFunc::SplitFunc |
( |
const Pointer< Func > & |
orig_, |
|
|
const ivector & |
indices_, |
|
|
const dvector & |
point_, |
|
|
const vector< int > & |
ignore_ = vector<int>(0) | |
|
) |
| | [inline] |
Constructor.
- Parameters:
-
| 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. |
Definition at line 135 of file decomp.h.
Member Function Documentation
void SplitFunc::set_point |
( |
const UserVector< double > & |
x |
) |
const [inline] |
Sets point to value of x for variables, we represent and don't ignore.
- Parameters:
-
Definition at line 151 of file decomp.h.
double SplitFunc::eval |
( |
const UserVector< double > & |
x |
) |
const [inline, virtual] |
Computes the value of this function for a UserVector<double>.
Abstract.
- Parameters:
-
- Returns:
- The value this(x) as double.
Implements Func.
Definition at line 156 of file decomp.h.
void SplitFunc::grad |
( |
UserVector< double > & |
g, |
|
|
const UserVector< double > & |
x | |
|
) |
| | const [inline, virtual] |
Computes the (sub)gradient for a UserVector<double>.
Abstract.
- Parameters:
-
- See also:
- grad(const dvector&)
-
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 162 of file decomp.h.
Evaluates the product of the Hessian and a UserVector<double>.
Abstract.
- Parameters:
-
- See also:
- HessMult(const UserVector<double>&, const UserVector<double>&)
Implements Func.
Definition at line 173 of file decomp.h.
virtual void SplitFunc::set_curvature |
( |
CurvatureType |
ct |
) |
[inline, virtual] |
virtual CurvatureType SplitFunc::get_curvature |
( |
|
) |
const [inline, virtual] |
void SplitFunc::print |
( |
ostream & |
out |
) |
const [virtual] |
Print's out the dimension.
- Parameters:
-
| out | The ostream to print to. |
- See also:
- dim()
Reimplemented from Func.
Member Data Documentation
The indices of the variables of original function, this function relates on.
Definition at line 116 of file decomp.h.
A point, we can use to evaluate the original function.
Definition at line 120 of file decomp.h.
Variables, we relate to, but we ignore at evaluation.
Definition at line 127 of file decomp.h.
The documentation for this class was generated from the following file: