Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

GridWorld::State Struct Reference

Stores context used per node in path planning, stores row and column position. More...

#include <GridWorld.h>


Detailed Description

Stores context used per node in path planning, stores row and column position.

Definition at line 25 of file GridWorld.h.

List of all members.

Public Member Functions

 State ()
 default constructor, initializes to invalid position for fail-fast
 State (size_t row, size_t col)
 constructor from a coordinate pair
size_t hash () const
 a silly function to scatter row and column across the span of size_t
bool operator< (const State &other) const
 comparison operator to allow sorting states for faster lookup in std::set
bool operator== (const State &other) const
 equality is used to test against goal

Public Attributes

size_t r
 row
size_t c
 column

Friends

std::ostream & operator<< (std::ostream &os, const State &st)
 just for debugging

Constructor & Destructor Documentation

GridWorld::State::State (  ) 

default constructor, initializes to invalid position for fail-fast

Definition at line 27 of file GridWorld.h.

GridWorld::State::State ( size_t  row,
size_t  col 
)

constructor from a coordinate pair

Definition at line 29 of file GridWorld.h.


Member Function Documentation

size_t GridWorld::State::hash (  )  const

a silly function to scatter row and column across the span of size_t

Definition at line 31 of file GridWorld.h.

bool GridWorld::State::operator< ( const State other  )  const

comparison operator to allow sorting states for faster lookup in std::set

Definition at line 38 of file GridWorld.h.

bool GridWorld::State::operator== ( const State other  )  const

equality is used to test against goal

Definition at line 40 of file GridWorld.h.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const State st 
) [friend]

just for debugging

Definition at line 42 of file GridWorld.h.


Member Data Documentation


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:09 2016 by Doxygen 1.6.3