Symphony 1.0
Loading...
Searching...
No Matches
VacuumState Class Reference

Represents the state of the vacuum cleaner problem. More...

#include <vacuum.h>

Inheritance diagram for VacuumState:
Collaboration diagram for VacuumState:

Public Member Functions

 VacuumState ()
 
 VacuumState (int x, bool dirty0, bool dirty1)
 
void print () override
 Prints the state details.
 
- Public Member Functions inherited from State
 State ()
 Constructor for the State class.
 
virtual ~State ()
 Virtual destructor for the State class.
 

Public Attributes

int x
 
bool dirty0
 
bool dirty1
 

Detailed Description

Represents the state of the vacuum cleaner problem.

Definition at line 18 of file vacuum.h.

Constructor & Destructor Documentation

◆ VacuumState() [1/2]

VacuumState::VacuumState ( )
inline

Definition at line 20 of file vacuum.h.

20: x(0), dirty0(true), dirty1(true) {}
bool dirty0
Definition vacuum.h:23
bool dirty1
Definition vacuum.h:24

◆ VacuumState() [2/2]

VacuumState::VacuumState ( int  x,
bool  dirty0,
bool  dirty1 
)
inline

Definition at line 21 of file vacuum.h.

21: x(x), dirty0(dirty0), dirty1(dirty1) {}

Member Function Documentation

◆ print()

void VacuumState::print ( )
inlineoverridevirtual

Prints the state details.

This method should be overridden by the user to display meaningful information about the state.

Reimplemented from State.

Definition at line 25 of file vacuum.h.

25 {
26 std::cout << "VacuumState(" << x << ", " << dirty0 << ", " << dirty1 << ")" << std::endl;
27 }

References dirty0, dirty1, and x.

Member Data Documentation

◆ dirty0

bool VacuumState::dirty0

Definition at line 23 of file vacuum.h.

Referenced by VacuumCleaner::goal_test(), VacuumCleaner::heuristic(), and print().

◆ dirty1

bool VacuumState::dirty1

Definition at line 24 of file vacuum.h.

Referenced by print().

◆ x

int VacuumState::x

Definition at line 22 of file vacuum.h.

Referenced by print().


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