gamsFunc Class Reference

#include <gams.h>

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

List of all members.

Public Member Functions

 gamsFunc (int n, int connr_, Pointer< gamsNLData > data_, Pointer< SparsityInfo > sparsity_=NULL)
double eval (const UserVector< double > &x) const
 Computes the value of this function for a UserVector<double>.
double eval (const double *x) const
int valgrad (double &val, UserVector< double > &g, const UserVector< double > &x) const
 Computes the (sub)gradient and the value of this function for a UserVector<double>.
int valgrad (double &val, double *g, const double *x) const
void grad (UserVector< double > &g, const UserVector< double > &x) const
 Computes the (sub)gradient for a UserVector<double>.
void grad (dvector &g, const dvector &x) const
void grad (double *g, const double *x) const
void HessMult (UserVector< double > &y, const UserVector< double > &x, const UserVector< double > &z) const
 Evaluates the product of the Hessian and a UserVector<double>.
void HessMult (dvector &y, const dvector &x, const dvector &z) const
void HessMult (double *y, const double *x, const double *z) const
void set_curvature (CurvatureType ct)
CurvatureType get_curvature () const
void print (ostream &out) const
 Print's out the dimension.

Private Attributes

Pointer< gamsNLDatadata
int connr
Func::CurvatureType curv_type

Detailed Description

Definition at line 169 of file gams.h.


Constructor & Destructor Documentation

gamsFunc::gamsFunc ( int  n,
int  connr_,
Pointer< gamsNLData data_,
Pointer< SparsityInfo sparsity_ = NULL 
) [inline]

Definition at line 178 of file gams.h.


Member Function Documentation

double gamsFunc::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 182 of file gams.h.

double gamsFunc::eval ( const double *  x  )  const
int gamsFunc::valgrad ( double &  val,
UserVector< double > &  g,
const UserVector< double > &  x 
) const [inline, virtual]

Computes the (sub)gradient and the value of this function for a UserVector<double>.

Parameters:
val The double to store the value this(x).
g The UserVector<double> to store the gradient.
x The UserVector<double> to compute the gradient and value for.
Returns:
0, if all went right.
See also:
grad(UserVector<double>&, const UserVector<double>&)
add_grad(UserVector<double>&, const UserVector<double>&)
add_valgrad(UserVector<double>&, UserVector<double>&, const UserVector<double>&)

Reimplemented from Func.

Definition at line 188 of file gams.h.

int gamsFunc::valgrad ( double &  val,
double *  g,
const double *  x 
) const
void gamsFunc::grad ( UserVector< double > &  g,
const UserVector< double > &  x 
) const [inline, 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.

Definition at line 197 of file gams.h.

void gamsFunc::grad ( dvector g,
const dvector x 
) const [inline]

Definition at line 204 of file gams.h.

void gamsFunc::grad ( double *  g,
const double *  x 
) const [inline]

Definition at line 209 of file gams.h.

void gamsFunc::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.

Parameters:
y The UserVector<double> to store the result in: $ y = \nabla^2 f(x) \cdot z $.
x The UserVector<double> to evaluate the Hessian for.
z The UserVector<double> to multiply with the Hessian.
See also:
HessMult(const UserVector<double>&, const UserVector<double>&)

Implements Func.

Definition at line 215 of file gams.h.

void gamsFunc::HessMult ( dvector y,
const dvector x,
const dvector z 
) const [inline]

Definition at line 221 of file gams.h.

void gamsFunc::HessMult ( double *  y,
const double *  x,
const double *  z 
) const
void gamsFunc::set_curvature ( CurvatureType  ct  )  [inline, virtual]

Implements Func.

Definition at line 236 of file gams.h.

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

Implements Func.

Definition at line 237 of file gams.h.

void gamsFunc::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 239 of file gams.h.


Member Data Documentation

Definition at line 171 of file gams.h.

int gamsFunc::connr [private]

Definition at line 173 of file gams.h.

Definition at line 175 of file gams.h.


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

Generated on 10 Mar 2013 for LaGO by  doxygen 1.6.1