Djinni  2.2
Public Types | Public Member Functions | Protected Attributes
Compressed Class Reference

A penalty function for annealing which substantially implements the Ohlmann-Thomas compressed annealing functionality. More...

#include <Penalties.h>

List of all members.

Public Types

typedef double ReturnType

Public Member Functions

 Compressed ()
 Compressed (double expPower, double pcap, double cperc)
 Compressed (const Compressed &pfun)
virtual ~Compressed ()
void setPower (const double power)
void setPressureCap (const double cap)
void setCapPercentage (const double perc)
double getCapPercentage () const
double getExpPower () const
ReturnType operator() (const int iter) const

Protected Attributes

double _expPower
double _pressureCap
double _capPercentage

Detailed Description

A penalty function for annealing which substantially implements the Ohlmann-Thomas compressed annealing functionality.

Unfortunately, this class does not entirely encapsulate the necessary functionality. A trivial specialization of the Annealer class is required. Interested parties are referred to the Annealer.initializeParam() method for more details.

Author:
Hansen, Thiede
Since:
2.1

Definition at line 19 of file Penalties.h.


Member Typedef Documentation

typedef double Compressed::ReturnType

All PenaltyFuncs must typedef their return value as ReturnType.

For compressed annealing, the lambda value is represented as a double. Hence, we typedef double to ReturnType.

Definition at line 26 of file Penalties.h.


Constructor & Destructor Documentation

Compressed::Compressed ( ) [inline]

Default constructor.

Please note that this will create a Compressed object with values you probably won't like. Make sure to set all values appropriately before use.

Definition at line 33 of file Penalties.h.

Compressed::Compressed ( double  expPower,
double  pcap,
double  cperc 
) [inline]

A constructor which initializes all data members at once.

This constructor is the one you should probably be using.

Parameters:
expPowerThe exponential factor involved in compression
pcapThe pressure cap
cpercThe percentage of cap

Definition at line 43 of file Penalties.h.

Compressed::Compressed ( const Compressed pfun) [inline]

This copy constructor should be entirely unnecessary.

Parameters:
pfunThe Compressed object to be copied

Definition at line 51 of file Penalties.h.

virtual Compressed::~Compressed ( ) [inline, virtual]

A no-op destructor.

This destructor has been virtualized in case you wish to later subclass off Compressed.

Definition at line 59 of file Penalties.h.


Member Function Documentation

double Compressed::getCapPercentage ( ) const [inline]

Gets the cap percentage.

Returns:
The cap percentage

Definition at line 90 of file Penalties.h.

Referenced by Annealer< Compressed, SolutionType >::initializeParam().

double Compressed::getExpPower ( ) const [inline]

Gets the current exponential factor used in compression.

Returns:
The exponential factor used in compression

Definition at line 98 of file Penalties.h.

ReturnType Compressed::operator() ( const int  iter) const [inline]

The required operator()(int) common to all PenaltyFuncs.

In compressed annealing, the return value varies over iterations. For many other types, this will simply return a constant value.

Definition at line 107 of file Penalties.h.

void Compressed::setCapPercentage ( const double  perc) [inline]

Sets the percentage of cap to use.

Parameters:
percThe percentage of cap to use.

Definition at line 82 of file Penalties.h.

void Compressed::setPower ( const double  power) [inline]

Sets the exponential factor for the compression.

Parameters:
powerThe new exponential power to use

Definition at line 66 of file Penalties.h.

void Compressed::setPressureCap ( const double  cap) [inline]

Sets the pressure cap.

Parameters:
capThe new pressure cap to use

Definition at line 74 of file Penalties.h.

Referenced by Annealer< Compressed, SolutionType >::initializeParam().


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