HOG2
Public Member Functions | Public Attributes | List of all members
WitnessState< width, height > Class Template Reference

#include <Witness.h>

Public Member Functions

 WitnessState ()
 
 WitnessState (const WitnessState< width, height > &state)
 
void Reset ()
 
bool Occupied (int which)
 
bool isAlongTheWall () const
 
bool hitTheWall () const
 
bool Occupied (int x, int y) const
 
void Occupy (int x, int y)
 
void Unoccupy (int x, int y)
 
bool OccupiedEdge (int x1, int y1, int x2, int y2) const
 
void OccupyEdge (int x1, int y1, int x2, int y2)
 
void UnoccupyEdge (int x1, int y1, int x2, int y2)
 
bool InGoal () const
 

Public Attributes

std::vector< std::pair< int, int > > path
 
std::bitset<(width+1) *(height+1)> occupiedCorners
 
std::bitset<(width+1) *(height)+(width) *(height+1)> occupiedEdges
 

Detailed Description

template<int width, int height>
class WitnessState< width, height >

Definition at line 42 of file Witness.h.

Constructor & Destructor Documentation

◆ WitnessState() [1/2]

template<int width, int height>
WitnessState< width, height >::WitnessState ( )
inline

Definition at line 48 of file Witness.h.

References WitnessState< width, height >::Reset().

◆ WitnessState() [2/2]

template<int width, int height>
WitnessState< width, height >::WitnessState ( const WitnessState< width, height > &  state)
inline

Member Function Documentation

◆ hitTheWall()

template<int width, int height>
bool WitnessState< width, height >::hitTheWall ( ) const
inline

Definition at line 97 of file Witness.h.

References height, and width.

◆ InGoal()

template<int width, int height>
bool WitnessState< width, height >::InGoal ( ) const
inline

Definition at line 127 of file Witness.h.

References height, and width.

Referenced by Witness< width, height >::GetMouseActions().

◆ isAlongTheWall()

template<int width, int height>
bool WitnessState< width, height >::isAlongTheWall ( ) const
inline

Definition at line 87 of file Witness.h.

References height, and width.

◆ Occupied() [1/2]

template<int width, int height>
bool WitnessState< width, height >::Occupied ( int  which)
inline

◆ Occupied() [2/2]

template<int width, int height>
bool WitnessState< width, height >::Occupied ( int  x,
int  y 
) const
inline

Definition at line 106 of file Witness.h.

References WitnessState< width, height >::occupiedCorners, and width.

◆ OccupiedEdge()

template<int width, int height>
bool WitnessState< width, height >::OccupiedEdge ( int  x1,
int  y1,
int  x2,
int  y2 
) const
inline

◆ Occupy()

template<int width, int height>
void WitnessState< width, height >::Occupy ( int  x,
int  y 
)
inline

◆ OccupyEdge()

template<int width, int height>
void WitnessState< width, height >::OccupyEdge ( int  x1,
int  y1,
int  x2,
int  y2 
)
inline

◆ Reset()

template<int width, int height>
void WitnessState< width, height >::Reset ( )
inline

◆ Unoccupy()

template<int width, int height>
void WitnessState< width, height >::Unoccupy ( int  x,
int  y 
)
inline

◆ UnoccupyEdge()

template<int width, int height>
void WitnessState< width, height >::UnoccupyEdge ( int  x1,
int  y1,
int  x2,
int  y2 
)
inline

Member Data Documentation

◆ occupiedCorners

template<int width, int height>
std::bitset<(width + 1) * (height + 1)> WitnessState< width, height >::occupiedCorners

◆ occupiedEdges

template<int width, int height>
std::bitset<(width + 1) * (height) + (width) * (height + 1)> WitnessState< width, height >::occupiedEdges

◆ path

template<int width, int height>
std::vector<std::pair<int, int> > WitnessState< width, height >::path

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