HCL_LinCombFcnlGrad_d represents a linear combination of real-valued functions with gradients
![]() | Domain () Domain space access |
![]() | EvaluateGrad ( const HCL_Vector_d & x ) EvaluateGrad creates an "evaluation" object, which knows how to compute the function value and gradient at the given x |
![]() | HCL_LinCombFcnlGrad_d ( HCL_FunctionalGrad_d * f1, double w1, HCL_FunctionalGrad_d * f2, double w2 ) Special constructor |
![]() | HCL_LinCombFcnlGrad_d ( HCL_VectorSpace_d * dom, int n ) Usual constructor |
![]() | MaxStep ( const HCL_Vector_d & x, const HCL_Vector_d &dir) MaxStep computes the longest vector from x in the direction dir that will lie in the domain of the functional; that is, it computes the greatest a such that x + a*dir lies in the domain |
![]() | Parameters () Access to parameter table |
![]() | SetNext ( HCL_FunctionalGrad_d * eval, double w ) SetNext allows the next term in the linear combination to be added |
![]() | Write ( ostream & str ) Debugging information |
HCL_LinCombFcnlGrad_d represents a linear combination of real-valued functions with gradients. This object is useful for representing penalty functionals and similar linear combinations.For the primary methods of this class, see HCL_FunctionalGrad_d.
There are two ways to construct a linear combination of functionals. There is a special constructor for th common case of two terms:
For the more general case of $n$ terms, there is a constructor which takes a pointer to the domain of the functional and the integer $n$. The terms in the linear combination must then be added one-by-one using the SetNext method. Example:
// Assume HCL_FunctionalGrad_d's f1, f2, g1, g2, and g3 have been defined. // Create the linear combination F(x) = f1(x) + 100*f2(x) HCL_LinCombFcnlGrad_d F( &f1,1.0,&f2,100.0 ); // Create the linear combination G(x) = g1(x) + 100*g2(x) + 10*g3(x) HCL_LinCombFcnlGrad_d G( &(g1.Domain()),3 ); G.SetNext( &g1,1.0 ); G.SetNext( &g2,100.0 ); G.SetNext( &g3,10.0 );
HCL_LinCombFcnlGrad_d( HCL_FunctionalGrad_d * f1, double w1, HCL_FunctionalGrad_d * f2, double w2 )
virtual HCL_VectorSpace_d& Domain()
virtual double MaxStep( const HCL_Vector_d & x, const HCL_Vector_d &dir)
Table& Parameters()
virtual HCL_EvaluateFunctionalGrad_d* EvaluateGrad( const HCL_Vector_d & x )
void SetNext( HCL_FunctionalGrad_d * eval, double w )
virtual ostream& Write( ostream & str )
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de