Interior-point-optimisation  1.0-1
Interior-pointoptimisationlibrary
ipo_function::concrete::NullFunction Class Reference

This class represents a null function. More...

#include <Null.hpp>

Inheritance diagram for ipo_function::concrete::NullFunction:
Inheritance graph
Collaboration diagram for ipo_function::concrete::NullFunction:
Collaboration graph

Public Member Functions

 NullFunction ()
 Specify a constructor argument if you want to be able to check the size of the argument in a Model Objective or Constraint and do not need this size to vary. More...
 
double operator() (gsl::vector const &vector)
 The function operator: returns 0. More...
 
gsl::vector gradient (gsl::vector const &vector)
 The function operator: returns a vector of 0s. More...
 
gsl::matrix hessian (gsl::vector const &vector)
 The function operator: returns the Hessian: a matrix of 0s. More...
 
- Public Member Functions inherited from ipo_function::Function
 Function (size_t const size=0)
 Constructor. More...
 
virtual std::tuple
< gsl::vector, gsl::matrix > 
derivatives (gsl::vector const &vector)
 Compute or estimate derivative values. More...
 
- Public Member Functions inherited from ipo_function::detail::FunctionBase
 FunctionBase (size_t const size=0)
 Constructor. More...
 
virtual ~FunctionBase ()=0
 Make the class abstract. More...
 
size_t getSize () const
 Get size of vector for function arguments or zero for arbitrary size. More...
 

Additional Inherited Members

- Protected Attributes inherited from ipo_function::Function
double h = std::sqrt( std::numeric_limits<double>::epsilon() )
 Value used for default gradient estimates. More...
 
double h2 = std::sqrt( h )
 Value used for default Hessian estimates. More...
 
- Protected Attributes inherited from ipo_function::detail::FunctionBase
size_t const size
 Size of vector arguments to supply to subclass functions. More...
 

Detailed Description

This class represents a null function.

It is used to initialise a Model so that it always has some valid objective.

Definition at line 32 of file Null.hpp.

Constructor & Destructor Documentation

NullFunction::NullFunction ( )

Specify a constructor argument if you want to be able to check the size of the argument in a Model Objective or Constraint and do not need this size to vary.

Definition at line 28 of file Null.cc.

Member Function Documentation

gsl::vector NullFunction::gradient ( gsl::vector const &  vector)
virtual

The function operator: returns a vector of 0s.

Parameters
vectorA vector argument
Returns
The gradient (a vector of 0s)

Reimplemented from ipo_function::Function.

Definition at line 34 of file Null.cc.

gsl::matrix NullFunction::hessian ( gsl::vector const &  vector)
virtual

The function operator: returns the Hessian: a matrix of 0s.

Parameters
vectorA vector argument
Returns
The Hessian: a matrix of zeros

Reimplemented from ipo_function::Function.

Definition at line 38 of file Null.cc.

double NullFunction::operator() ( gsl::vector const &  vector)
virtual

The function operator: returns 0.

Parameters
vectorA vector argument
Returns
The sum of vector entries

Implements ipo_function::Function.

Definition at line 31 of file Null.cc.


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