Overseer
Public Member Functions | List of all members
Overseer::Graph Class Reference

Is a mathematical "graphmap" for analysing. More...

#include "src/Graph.h"

Public Member Functions

 Graph ()
 empty constructor
 
 Graph (Map *map)
 object constructor. More...
 
std::vector< ChokePointgetChokePoints (size_t region_id_a, size_t region_id_b) const
 Gets the chokepoints been descovered between two adjacent regions. More...
 
std::vector< ChokePointgetChokePoints () const
 Gets all the chokepoints on the map. More...
 
ChokePoint getChokePoint (ChokePointId cp_id) const
 Get the spacific chokepoint from a chokepoint id. More...
 
CPPath & getPath (ChokePoint cp_a, ChokePoint cp_b)
 Gets a sorted list of chokepoint between chokepoint cp_a and cp_b. More...
 
void createChokePoints ()
 find and create the chokepoint on the map.
 
void computePaths ()
 Calculate all paths between all chokepoints.
 
void setMap (Map *map)
 set the sc2 map to this class. More...
 

Detailed Description

Is a mathematical "graphmap" for analysing.

Constructor & Destructor Documentation

◆ Graph()

Overseer::Graph::Graph ( Map map)

object constructor.

Parameters
mapThe map to make the graph on.

Member Function Documentation

◆ getChokePoint()

ChokePoint Overseer::Graph::getChokePoint ( ChokePointId  cp_id) const

Get the spacific chokepoint from a chokepoint id.

Parameters
cp_idThe id to the wanted chokepoint.
Returns
The chokepoint mapped to the cp_id.

◆ getChokePoints() [1/2]

std::vector< ChokePoint > Overseer::Graph::getChokePoints ( size_t  region_id_a,
size_t  region_id_b 
) const

Gets the chokepoints been descovered between two adjacent regions.

Parameters
region_id_aa region which is adjacent to region_id_b
region_id_ba region which is adjacent to region_id_a
Returns
A vector containing all the found chokepoint between the two regions.

◆ getChokePoints() [2/2]

std::vector< ChokePoint > Overseer::Graph::getChokePoints ( ) const

Gets all the chokepoints on the map.

Returns
vector containing the chokepoints

◆ getPath()

CPPath & Overseer::Graph::getPath ( ChokePoint  cp_a,
ChokePoint  cp_b 
)

Gets a sorted list of chokepoint between chokepoint cp_a and cp_b.

Parameters
cp_athe first chokepoint.
cp_bthe second chokepoint.
Returns
The chokepoint path between cp_a and cp_b.

◆ setMap()

void Overseer::Graph::setMap ( Map map)

set the sc2 map to this class.

Parameters
mapis a pointer to the map.

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