# NLPInterfacePack::ExampleNLPFirstOrder Class Reference

Simple example NLP subclass to illustrate how to implement the `NLPFirstOrder` interface for a specialized `NLP`. More...

`#include <NLPInterfacePack_ExampleNLPFirstOrder.hpp>`

Inheritance diagram for NLPInterfacePack::ExampleNLPFirstOrder:

[legend]
List of all members.

## Overridden public members from NLP

void initialize (bool test_setup)

bool is_initialized () const

## Overridden public members from NLPFirstOrder

void set_Gc (MatrixOp *Gc)
Overridden to check the concrete type of Gc.
const NLPFirstOrder::mat_fcty_ptr_t factory_Gc () const

const basis_sys_ptr_t basis_sys () const
Returns an ExampleBasisSystem.

## Overridden protected members from NLPFirstOrder

void imp_calc_Gc (const Vector &x, bool newx, const FirstOrderInfo &first_order_info) const

## Public Member Functions

ExampleNLPFirstOrder (const VectorSpace::space_ptr_t &vec_space, value_type xo, bool has_bounds, bool dep_bounded)
Constructor (see ExampleNLPDirect::ExampleNLPDirect()).

## Detailed Description

Simple example NLP subclass to illustrate how to implement the `NLPFirstOrder` interface for a specialized `NLP`.

The example NLP we will use is a scalable problem where the basis of the jacobian of the constraints is a diagonal matrix.

```    min    f(x) = (1/2) * sum( x(i)^2, for i = 1..n )
s.t.   c(x)(j) = x(j) * (x(m+j) -1) - 10 * x(m+j) = 0, for j = 1..m
0.01 < x(i) < 20, for i = p...p+m

where:
m = n/2
p = 1 if dep_bounded == true or m+1 if dep_bounded = false
```
This subclass inherits from the subclass `ExampleNLPDirect` mostly out of lazyness but also to show how flexible these interfaces can be using mutiple inheritance.

ToDo: Finish documentation!

Definition at line 60 of file NLPInterfacePack_ExampleNLPFirstOrder.hpp.

## Constructor & Destructor Documentation

 NLPInterfacePack::ExampleNLPFirstOrder::ExampleNLPFirstOrder ( const VectorSpace::space_ptr_t & vec_space, value_type xo, bool has_bounds, bool dep_bounded )

Constructor (see ExampleNLPDirect::ExampleNLPDirect()).

Definition at line 45 of file NLPInterfacePack_ExampleNLPFirstOrder.cpp.

## Member Function Documentation

 void NLPInterfacePack::ExampleNLPFirstOrder::initialize ( bool test_setup ) ` [virtual]`

Reimplemented from NLPInterfacePack::NLPFirstOrder.

Definition at line 86 of file NLPInterfacePack_ExampleNLPFirstOrder.cpp.

 bool NLPInterfacePack::ExampleNLPFirstOrder::is_initialized ( ) const` [virtual]`

Definition at line 98 of file NLPInterfacePack_ExampleNLPFirstOrder.cpp.

 void NLPInterfacePack::ExampleNLPFirstOrder::set_Gc ( MatrixOp * Gc ) ` [virtual]`

Overridden to check the concrete type of Gc.

Reimplemented from NLPInterfacePack::NLPFirstOrder.

Definition at line 65 of file NLPInterfacePack_ExampleNLPFirstOrder.cpp.

 const NLPFirstOrder::mat_fcty_ptr_t NLPInterfacePack::ExampleNLPFirstOrder::factory_Gc ( ) const` [virtual]`

Implements NLPInterfacePack::NLPFirstOrder.

Definition at line 73 of file NLPInterfacePack_ExampleNLPFirstOrder.cpp.

 const NLPFirstOrder::basis_sys_ptr_t NLPInterfacePack::ExampleNLPFirstOrder::basis_sys ( ) const` [virtual]`

Returns an ExampleBasisSystem.

Reimplemented from NLPInterfacePack::NLPFirstOrder.

Definition at line 79 of file NLPInterfacePack_ExampleNLPFirstOrder.cpp.

 void NLPInterfacePack::ExampleNLPFirstOrder::imp_calc_Gc ( const Vector & x, bool newx, const FirstOrderInfo & first_order_info ) const` [protected]`

Definition at line 105 of file NLPInterfacePack_ExampleNLPFirstOrder.cpp.

The documentation for this class was generated from the following files:
Generated on Wed May 12 21:58:21 2010 for MOOCHO by  1.4.7