Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType > Class Template Reference

Soft DFS method solver.

#include <FCSSoftDFSSolvingAlgorithm.h>

Inheritance diagram for FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >:

FCSRandomDFSSolvingAlgorithm< SolvingAlgorithmType > List of all members.

Public Member Functions

 FCSSoftDFSSolvingAlgorithm (FCCommandLineArguments *CommandLine)
 Constructor with command line interface.
virtual ~FCSSoftDFSSolvingAlgorithm ()
 Destructor.
virtual FCSStateSolvingReturnCodes Solve (FCSStateWithLocations *StateWithLocations, int Depth)
 Solve the game.
virtual FCSStateSolvingReturnCodes Resume (int Depth)
 Resume solving a game.

Protected Member Functions

 FCSSoftDFSSolvingAlgorithm ()
 Default constructor.
void InitFCSSoftDFSSolvingAlgorithm ()
 The "real" default constructor.
virtual FCSStateSolvingReturnCodes SolveOrResume (int Depth)
 Solve or resume solving a game.
virtual void IncreaseDFSMaxDepth ()
 Increase the max depth and the affected structures.

Protected Attributes

int m_DFSMaxDepth
 Temporary max depth of the scan.
FCSDerivedStatesListm_SoftDFSDerivedStatesLists
 Derived state list for the soft-dfs scans.
int * m_SoftDFSCurrentStateIndexes
 m_SoftDFSCurrentStateIndexes[i] - The index of the last checked state in depth i.
int * m_SoftDFSTestIndexes
 m_SoftDFSTestIndexes[i] - The index of the test that was last performed. FCS performs each test separately, so states_to_check[i] and friends will not be overpopulated.
int * m_SoftDFSNumberOfFreestacks
 m_SoftDFSNumberOfFreestacks[i] - The number of unoccupied stacks that correspond to m_SolutionStates[i].
int * m_SoftDFSNumberOfFreecells
 m_SoftDFSNumberOfFreecells[i] - The number of unoccupied freecells that correspond to m_SolutionStates[i].

Detailed Description

template<class SolvingAlgorithmType>
class FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >

Definition at line 22 of file FCSSoftDFSSolvingAlgorithm.h.


Member Function Documentation

template<class SolvingAlgorithmType>
FCSStateSolvingReturnCodes FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::Resume int  Depth  )  [virtual]
 

Parameters:
Depth to continue at depth
Returns:
Solving return code

Definition at line 149 of file FCSSoftDFSSolvingAlgorithm.h.

References FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::SolveOrResume().

template<class SolvingAlgorithmType>
FCSStateSolvingReturnCodes FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::Solve FCSStateWithLocations StateWithLocations,
int  Depth
[virtual]
 

Parameters:
StateWithLocations is the start state
Depth is the starting depth
Returns:
Solving return code

Definition at line 135 of file FCSSoftDFSSolvingAlgorithm.h.

References FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::IncreaseDFSMaxDepth(), and FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::SolveOrResume().

template<class SolvingAlgorithmType>
FCSStateSolvingReturnCodes FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::SolveOrResume int  Depth  )  [protected, virtual]
 

Parameters:
Depth to continue at depth
Returns:
Solving return code

Reimplemented in FCSRandomDFSSolvingAlgorithm< SolvingAlgorithmType >.

Definition at line 157 of file FCSSoftDFSSolvingAlgorithm.h.

References FCSStateWithLocations::GetFreecellCardNumber(), FCSStateWithLocations::GetStackLength(), FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::IncreaseDFSMaxDepth(), FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::m_DFSMaxDepth, FCSDerivedStatesList::m_NumberOfStates, FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::m_SoftDFSCurrentStateIndexes, FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::m_SoftDFSDerivedStatesLists, FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::m_SoftDFSNumberOfFreecells, FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::m_SoftDFSNumberOfFreestacks, FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::m_SoftDFSTestIndexes, FCSDerivedStatesList::m_States, FCSStateWithLocations::m_Visited, and FCSStateWithLocations::m_VisitIterations.

Referenced by FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::Resume(), and FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::Solve().


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 11:20:17 2005 for Cpp Freecell Solver by  doxygen 1.4.4