HillClimb Class Reference

#include <HillClimb.h>

Inheritance diagram for HillClimb:

HillClimb_MPI RandomRestart_MPI

List of all members.

Public Member Functions

 HillClimb (Gene *G, Fitness *F, glotzmath::RandomNumberGenerator *RG)
 HillClimb (Gene *G, Fitness *F, glotzmath::RandomNumberGenerator *RG, const char &SType)
 HillClimb (Gene *G, Fitness *F, glotzmath::RandomNumberGenerator *RG, const bool &NeedsEval)
 HillClimb (Gene *G, Fitness *F, glotzmath::RandomNumberGenerator *RG, const bool &NeedsEval, const char &SType)
 HillClimb (std::ifstream &Input, Fitness *F, glotzmath::RandomNumberGenerator *RG)
void Run (const unsigned int &NumSteps)
bool RunToLocalMax ()
bool RunToLocalMax (const unsigned int &MaxSteps)
void ChangeGene (Gene *G)
double GetFitness ()
void PrintGene ()
GeneGetGene () const
void SaveHCToFile (std::ofstream &Output) const
bool IsAtLocalMax () const
virtual unsigned int EvaluateAllFitness (Gene **Successors, double *FitArray, const unsigned int &NumSuccessors)
 ~HillClimb ()

Protected Member Functions

virtual bool GetSuccess (const bool &Suc)
void Run (const unsigned int &NumSteps, HillClimb *RHS)
void ChangeGene (Gene *G, const bool &AtMax)
bool RunToLocalMax (HillClimb *RHS)
bool RunToLocalMax (const unsigned int &MaxSteps, HillClimb *RHS)
double EvaluateFitness (Gene *G)

Private Member Functions

bool Steepest_Ascent ()
bool Stochastic_Hill_Climb ()
bool First_Choice ()
bool Steepest_Ascent (HillClimb *RHS)
bool Stochastic_Hill_Climb (HillClimb *RHS)

Private Attributes

RandomNumberGenerator * MyRandGen
FitnessMyFitness
GeneMyGene
double CurrentFitnessValue
unsigned int NumSteps
char SearchType
bool AtLocalMax


Constructor & Destructor Documentation

HillClimb::HillClimb ( Gene G,
Fitness F,
glotzmath::RandomNumberGenerator RG 
)

HillClimb::HillClimb ( Gene G,
Fitness F,
glotzmath::RandomNumberGenerator RG,
const char &  SType 
)

HillClimb::HillClimb ( Gene G,
Fitness F,
glotzmath::RandomNumberGenerator RG,
const bool &  NeedsEval 
)

HillClimb::HillClimb ( Gene G,
Fitness F,
glotzmath::RandomNumberGenerator RG,
const bool &  NeedsEval,
const char &  SType 
)

HillClimb::HillClimb ( std::ifstream &  Input,
Fitness F,
glotzmath::RandomNumberGenerator RG 
)

HillClimb::~HillClimb (  ) 


Member Function Documentation

void HillClimb::Run ( const unsigned int &  NumSteps  ) 

Reimplemented in HillClimb_MPI, and RandomRestart_MPI.

bool HillClimb::RunToLocalMax (  ) 

Reimplemented in HillClimb_MPI.

bool HillClimb::RunToLocalMax ( const unsigned int &  MaxSteps  ) 

Reimplemented in HillClimb_MPI.

void HillClimb::ChangeGene ( Gene G  ) 

double HillClimb::GetFitness (  ) 

void HillClimb::PrintGene (  ) 

Reimplemented in HillClimb_MPI.

Gene * HillClimb::GetGene (  )  const

void HillClimb::SaveHCToFile ( std::ofstream &  Output  )  const

bool HillClimb::IsAtLocalMax (  )  const

unsigned int HillClimb::EvaluateAllFitness ( Gene **  Successors,
double *  FitArray,
const unsigned int &  NumSuccessors 
) [virtual]

Reimplemented in HillClimb_MPI.

bool HillClimb::GetSuccess ( const bool &  Suc  )  [protected, virtual]

Reimplemented in HillClimb_MPI.

void HillClimb::Run ( const unsigned int &  NumSteps,
HillClimb RHS 
) [protected]

void HillClimb::ChangeGene ( Gene G,
const bool &  AtMax 
) [protected]

bool HillClimb::RunToLocalMax ( HillClimb RHS  )  [protected]

bool HillClimb::RunToLocalMax ( const unsigned int &  MaxSteps,
HillClimb RHS 
) [protected]

double HillClimb::EvaluateFitness ( Gene G  )  [protected]

bool HillClimb::Steepest_Ascent (  )  [private]

bool HillClimb::Stochastic_Hill_Climb (  )  [private]

bool HillClimb::First_Choice (  )  [private]

bool HillClimb::Steepest_Ascent ( HillClimb RHS  )  [private]

bool HillClimb::Stochastic_Hill_Climb ( HillClimb RHS  )  [private]


Member Data Documentation

RandomNumberGenerator* HillClimb::MyRandGen [private]

Fitness* HillClimb::MyFitness [private]

Reimplemented in HillClimb_MPI.

Gene* HillClimb::MyGene [private]

double HillClimb::CurrentFitnessValue [private]

unsigned int HillClimb::NumSteps [private]

char HillClimb::SearchType [private]

bool HillClimb::AtLocalMax [private]

Reimplemented in RandomRestart_MPI.


The documentation for this class was generated from the following files:
Generated on Tue Feb 24 20:53:09 2009 by  doxygen 1.5.3