HOG2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MapSectorAbstraction Class Reference

#include <MapSectorAbstraction.h>

Inheritance diagram for MapSectorAbstraction:
Inheritance graph
[legend]
Collaboration diagram for MapSectorAbstraction:
Collaboration graph
[legend]

Public Member Functions

 MapSectorAbstraction (Map *, int, int)
 Creat a SectorAbstraction of the map. More...
 
 MapSectorAbstraction (Map *, int)
 
 ~MapSectorAbstraction ()
 
MapAbstraction * Clone (Map *_m)
 
virtual bool Pathable (node *from, node *to)
 
virtual void VerifyHierarchy ()
 verify that the hierarchy is consistent More...
 
virtual void RemoveNode (node *n)
 remove node from abstraction More...
 
virtual void RemoveEdge (edge *e, unsigned int absLevel)
 remove edge from abstraction More...
 
virtual void AddNode (node *n)
 add node to abstraction More...
 
virtual void AddEdge (edge *e, unsigned int absLevel)
 add edge to abstraction More...
 
virtual void RepairAbstraction ()
 This must be called after any of the above add/remove operations. More...
 

Private Member Functions

void buildAbstraction ()
 
void buildNodeIntoParent (node *n, node *parent)
 
void abstractionBFS (node *which, node *parent, int quadrant)
 
int getQuadrant (node *which)
 
void addEdges (Graph *g)
 
void addNodes (Graph *g)
 

Private Attributes

int sectorSize
 
int sectorMultiplier
 

Detailed Description

Definition at line 17 of file MapSectorAbstraction.h.

Constructor & Destructor Documentation

◆ MapSectorAbstraction() [1/2]

MapSectorAbstraction::MapSectorAbstraction ( Map _m,
int  _sectorSize,
int  _sectorMultiplier 
)

Creat a SectorAbstraction of the map.

The sector size must be greater than 1

Definition at line 19 of file MapSectorAbstraction.cpp.

References buildAbstraction().

Referenced by Clone().

◆ MapSectorAbstraction() [2/2]

MapSectorAbstraction::MapSectorAbstraction ( Map _m,
int  _sectorSize 
)

Definition at line 27 of file MapSectorAbstraction.cpp.

References buildAbstraction().

◆ ~MapSectorAbstraction()

MapSectorAbstraction::~MapSectorAbstraction ( )

Definition at line 34 of file MapSectorAbstraction.cpp.

Member Function Documentation

◆ abstractionBFS()

void MapSectorAbstraction::abstractionBFS ( node which,
node parent,
int  quadrant 
)
private

◆ AddEdge()

void MapSectorAbstraction::AddEdge ( edge e,
unsigned int  absLevel 
)
virtual

add edge to abstraction

Definition at line 83 of file MapSectorAbstraction.cpp.

◆ addEdges()

void MapSectorAbstraction::addEdges ( Graph g)
private

◆ AddNode()

void MapSectorAbstraction::AddNode ( node n)
virtual

add node to abstraction

Definition at line 76 of file MapSectorAbstraction.cpp.

◆ addNodes()

void MapSectorAbstraction::addNodes ( Graph g)
private

◆ buildAbstraction()

void MapSectorAbstraction::buildAbstraction ( )
private

Definition at line 95 of file MapSectorAbstraction.cpp.

References addEdges(), addNodes(), and GetMapGraph().

Referenced by MapSectorAbstraction().

◆ buildNodeIntoParent()

void MapSectorAbstraction::buildNodeIntoParent ( node n,
node parent 
)
private

◆ Clone()

MapAbstraction* MapSectorAbstraction::Clone ( Map _m)
inline

Definition at line 23 of file MapSectorAbstraction.h.

References MapSectorAbstraction(), and sectorSize.

◆ getQuadrant()

int MapSectorAbstraction::getQuadrant ( node which)
private

◆ Pathable()

bool MapSectorAbstraction::Pathable ( node from,
node to 
)
virtual

◆ RemoveEdge()

void MapSectorAbstraction::RemoveEdge ( edge e,
unsigned int  absLevel 
)
virtual

remove edge from abstraction

Definition at line 70 of file MapSectorAbstraction.cpp.

◆ RemoveNode()

void MapSectorAbstraction::RemoveNode ( node n)
virtual

remove node from abstraction

Definition at line 64 of file MapSectorAbstraction.cpp.

◆ RepairAbstraction()

void MapSectorAbstraction::RepairAbstraction ( )
virtual

This must be called after any of the above add/remove operations.

But the operations can be stacked followed by a single RepairAbstraction call.

Definition at line 91 of file MapSectorAbstraction.cpp.

◆ VerifyHierarchy()

void MapSectorAbstraction::VerifyHierarchy ( )
virtual

verify that the hierarchy is consistent

Definition at line 58 of file MapSectorAbstraction.cpp.

Member Data Documentation

◆ sectorMultiplier

int MapSectorAbstraction::sectorMultiplier
private

Definition at line 52 of file MapSectorAbstraction.h.

Referenced by getQuadrant().

◆ sectorSize

int MapSectorAbstraction::sectorSize
private

Definition at line 52 of file MapSectorAbstraction.h.

Referenced by Clone(), and getQuadrant().


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