Monom Class Reference

Class to represent a Monom. More...

#include <polynom.h>

Inheritance diagram for Monom:
Inheritance graph
[legend]
Collaboration diagram for Monom:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Monom (int dim_, MultiIndex &indices_)
 Constructor for a MultiIndex of indices.
double eval (const UserVector< double > &x) const
 Computes the value of this function for a UserVector<double>.
void grad (UserVector< double > &grad, 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
 Computes the multiplication of the hessian of this Monom with a UserVector.
double part_derivate (const UserVector< double > &x, const MultiIndex &ind) const
 Gives a partial derivate in a point.
virtual void set_curvature (CurvatureType ct)
virtual CurvatureType get_curvature () const
void print (ostream &out) const
 Print's out the dimension.

Private Member Functions

double part_derivate_rek (const UserVector< double > &x, MultiIndex &alpha, MultiIndex &beta) const
 Recursive algorithm to compute a partial derivate of a Monom.

Private Attributes

MultiIndex indices

Detailed Description

Class to represent a Monom.

Definition at line 66 of file polynom.h.


Constructor & Destructor Documentation

Monom::Monom ( int  dim_,
MultiIndex indices_ 
) [inline]

Constructor for a MultiIndex of indices.

Parameters:
dim_ The dimension of this function.
indices_ The indices, for which this class represents the monom. If an empty set is given, this monom will be the constant function 1.

Definition at line 84 of file polynom.h.


Member Function Documentation

double Monom::part_derivate_rek ( const UserVector< double > &  x,
MultiIndex alpha,
MultiIndex beta 
) const [private]

Recursive algorithm to compute a partial derivate of a Monom.

Computes $\frac{\partial x^\alpha}{\partial x^{\beta_1}}(x)$

Parameters:
x The UserVector, for which we want to compute the derivative.
alpha The indices, which are left in our Monom.
beta The indices, we need to derive for.
Returns:
The derivative $\frac{\partial^{|\beta|} x^\alpha}{\partial x^\beta}(x)$
double Monom::eval ( const UserVector< double > &  x  )  const [inline, virtual]

Computes the value of this function for a UserVector<double>.

Abstract.

Parameters:
x The UserVector<double> to compute the value for.
Returns:
The value this(x) as double.

Implements Func.

Definition at line 91 of file polynom.h.

void Monom::grad ( UserVector< double > &  g,
const UserVector< double > &  x 
) const [virtual]

Computes the (sub)gradient for a UserVector<double>.

Abstract.

Parameters:
g The UserVector<double> to store the result in.
x The UserVector<double> to compute the gradient for.
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.

void Monom::HessMult ( UserVector< double > &  y,
const UserVector< double > &  x,
const UserVector< double > &  z 
) const [virtual]

Computes the multiplication of the hessian of this Monom with a UserVector.

Sets $y_i = \sum_{j,z_j\neq 0} \frac{\partial *this}{\partial x_i x_j}(x) z_j$

Parameters:
y The UserVector to store the result in.
x The UserVector to compute the hessian for.
z The UserVector to multiply with.

Implements Func.

double Monom::part_derivate ( const UserVector< double > &  x,
const MultiIndex ind 
) const [inline]

Gives a partial derivate in a point.

Parameters:
x The point to compute the derivative for.
ind The index-set of variables, which we want to derive.
Returns:
$\frac{\partial^{|\alpha|} *this}{\partial \alpha_1\cdots \partial \alpha_{|\alpha|}}$
See also:
part_derivate_rek(const UserVector<double>&, MultiIndex&, MultiIndex&) const;

Definition at line 116 of file polynom.h.

virtual void Monom::set_curvature ( CurvatureType  ct  )  [inline, virtual]

Implements Func.

Definition at line 122 of file polynom.h.

virtual CurvatureType Monom::get_curvature (  )  const [inline, virtual]

Implements Func.

Definition at line 123 of file polynom.h.

void Monom::print ( ostream &  out  )  const [inline, virtual]

Print's out the dimension.

Parameters:
out The ostream to print to.
See also:
dim()

Reimplemented from Func.

Definition at line 125 of file polynom.h.


Member Data Documentation

Definition at line 68 of file polynom.h.


The documentation for this class was generated from the following file:

Generated on 10 Mar 2013 for LaGO by  doxygen 1.6.1