MTK++ Latest version: 0.2.0

Public Member Functions | Protected Types | Protected Attributes
MTKpp::gaOutput Class Reference

Class to handle the GA output. More...

#include <mtkpp/src/GA/gaOutput.h>

Collaboration diagram for MTKpp::gaOutput:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 gaOutput (gaWorld *w)
 gaOutput Constructor
virtual ~gaOutput ()
 gaOutput destructor
void openOutputFile ()
 Open Output File.
void writeInput ()
 Write GA output file.
void writeResults ()
 Write GA output file.
void writeConvergence ()
 Write GA convergence file.
void setProgramName (std::string progName="MTK++::GA")
 Set program name.
void prtHeader (std::ostream &os)
 Write GA header.
void prtWorld (std::ostream &os)
 Print gaWorld information.
void prtOptions (std::ostream &os)
 Print inputed options.
void prtTail (std::ostream &os)
 Print inputed options.
void prtWarning (std::ostream &os, std::string warning)
 Print warning message.
void writeWarning (std::string warning)
 Write warning message to output file.
void prtError (std::ostream &os, std::string error)
 Print error message.
void writeError (std::string error)
 Write error message to output file.

Protected Types

typedef std::vector< gaRegion * >
::iterator 
regionIterator
 region iterator
typedef std::vector
< gaPopulation * >::iterator 
populationIterator
 population iterator
typedef std::vector
< gaIndividual * >::iterator 
individualIterator
 individual iterator

Protected Attributes

gaWorldmyWorld
 gaWorld pointer
std::string programName
 Program name.
std::ofstream outputFileStream
 Output File Stream.
std::ofstream convergFileStream
 Convergence File Stream.

Detailed Description

Class to handle the GA output.

Author:
Martin Peters
Version:
0.1
Date:
2005

Member Typedef Documentation

typedef std::vector<gaRegion*>::iterator MTKpp::gaOutput::regionIterator [protected]

region iterator

typedef std::vector<gaPopulation*>::iterator MTKpp::gaOutput::populationIterator [protected]

population iterator

typedef std::vector<gaIndividual*>::iterator MTKpp::gaOutput::individualIterator [protected]

individual iterator


Constructor & Destructor Documentation

MTKpp::gaOutput::gaOutput ( gaWorld w)

gaOutput Constructor

Parameters:
wgaWorld pointer

References programName.

MTKpp::gaOutput::~gaOutput ( ) [virtual]

gaOutput destructor


Member Function Documentation

void MTKpp::gaOutput::openOutputFile ( )
void MTKpp::gaOutput::writeInput ( )

Write GA output file.

References myWorld, outputFileStream, prtOptions(), and prtWorld().

void MTKpp::gaOutput::writeResults ( )

Write GA output file.

References outputFileStream, prtTail(), and prtWorld().

void MTKpp::gaOutput::writeConvergence ( )
void MTKpp::gaOutput::setProgramName ( std::string  progName = "MTK++::GA")

Set program name.

Parameters:
progNameProgram name

References programName.

void MTKpp::gaOutput::prtHeader ( std::ostream &  os)

Write GA header.

References MTKpp::copyright(), MTKpp::gaWorld::getAuthors(), myWorld, programName, and VERSION.

Referenced by openOutputFile().

void MTKpp::gaOutput::prtWorld ( std::ostream &  os)
void MTKpp::gaOutput::prtOptions ( std::ostream &  os)
void MTKpp::gaOutput::prtTail ( std::ostream &  os)

Print inputed options.

Parameters:
osOuput stream

References MTKpp::gaWorld::endTime, and myWorld.

Referenced by writeResults().

void MTKpp::gaOutput::prtWarning ( std::ostream &  os,
std::string  warning 
)

Print warning message.

Parameters:
osOuput stream
warningWarning message

References myWorld, and MTKpp::gaWorld::setStatus().

Referenced by writeWarning().

void MTKpp::gaOutput::writeWarning ( std::string  warning)

Write warning message to output file.

Parameters:
warningWarning message

References outputFileStream, and prtWarning().

void MTKpp::gaOutput::prtError ( std::ostream &  os,
std::string  error 
)

Print error message.

Parameters:
osOuput stream
errorError message

References myWorld, and MTKpp::gaWorld::setStatus().

Referenced by writeError().

void MTKpp::gaOutput::writeError ( std::string  error)

Write error message to output file.

Parameters:
errorError message

References outputFileStream, and prtError().

Referenced by MTKpp::gaWorld::setup().


Member Data Documentation

std::string MTKpp::gaOutput::programName [protected]

Program name.

Referenced by gaOutput(), prtHeader(), and setProgramName().

std::ofstream MTKpp::gaOutput::outputFileStream [protected]

Output File Stream.

Referenced by openOutputFile(), writeError(), writeInput(), writeResults(), and writeWarning().

std::ofstream MTKpp::gaOutput::convergFileStream [protected]

Convergence File Stream.

Referenced by writeConvergence().


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

Generated on Fri Dec 23 2011 09:28:55 for MTK++ by Doxygen 1.7.5.1