Jafar
|
Navigation graph class Manipulate vertices as 2d positions and each position is unique. More...
Navigation graph class Manipulate vertices as 2d positions and each position is unique.
Definition at line 42 of file Graphs.hpp.
#include <Graphs.hpp>
Public Types | |
typedef adjacency_list< listS, vecS, directedS, VERTEX_BUNDLE, EDGE_BUNDLE > | GraphContainer |
typedef graph_traits < GraphContainer > ::vertex_descriptor | Vertex |
typedef graph_traits < GraphContainer > ::edge_descriptor | Edge |
typedef std::pair< Edge, Edge > | EdgePair |
typedef graph_traits < GraphContainer > ::vertex_iterator | vertex_iterator |
typedef graph_traits < GraphContainer > ::edge_iterator | edge_iterator |
typedef graph_traits < GraphContainer > ::adjacency_iterator | adjacency_iterator |
typedef graph_traits < GraphContainer > ::out_edge_iterator | out_edge_iterator |
typedef graph_traits < GraphContainer > ::degree_size_type | degree_t |
typedef std::pair < adjacency_iterator, adjacency_iterator > | adjacency_vertex_range_t |
typedef std::pair < out_edge_iterator, out_edge_iterator > | out_edge_range_t |
typedef std::pair < vertex_iterator, vertex_iterator > | vertex_range_t |
typedef std::pair < edge_iterator, edge_iterator > | edge_range_t |
typedef std::map< int, Vertex > | PosToVertex |
typedef std::map< int, Vertex > ::iterator | PosToVertex_iterator |
typedef property_map < GraphContainer, EDGE_WEIGHT_T EDGE_BUNDLE::* > ::type | WeightMap |
Public Member Functions | |
NavGraphT (int _xsize, int _ysize) | |
Create a navigation graph for a terrain (xsize,ysize) | |
Vertex | getVertex (const NavLocation &loc) |
Get the vertex index of the graph node corresponding to the given location loc. | |
bool | getVertex (const NavLocation &loc, Vertex &v, bool check=false) |
The same as getVertex but check if vertex exists. | |
NavLocation | getClosestLocation (const NavLocation &_loc) |
Returns closest location to _loc that is in-graph. | |
Edge | getEdge (const NavLocation &loc1, const NavLocation &loc2) |
Returns the edge descriptor between two locations. | |
Edge | getEdge (const NavLocation &loc1, const Vertex &vloc2) |
Returns the edge descriptor between one vertex and one location. | |
Edge | getEdge (const Vertex &vloc1, const NavLocation &loc2) |
Returns the edge descriptor between one vertex and one location. | |
Edge | getEdge (const Vertex &vloc1, const Vertex &vloc2) |
Returns the edge descriptor between one vertex and one location. | |
bool | vertexExists (const NavLocation &loc) |
check the vertex existence with bundle | |
Vertex | addVertex (const NavLocation &loc) |
add the vertex with a given pos | |
void | removeGraphContent () |
Removes a vertex and all its edges. | |
bool | removeVertex (const NavLocation &loc) |
Removes a vertex and all its edges. | |
bool | removeEdgesOnly (const NavLocation &loc) |
Removes only the edges of a graph's vertex. | |
bool | removeOutEdges (const NavLocation &loc) |
Removes edges with source vertex as loc. | |
bool | removeInEdges (const NavLocation &loc) |
Removes edges with destination vertex as loc. | |
bool | addEdge (const NavLocation &loc1, const NavLocation &loc2, bool check=false) |
bool | addEdge (const NavLocation &loc1, const NavLocation &loc2, Edge &edge, bool check=false) |
bool | addEdge (const NavLocation &loc1, const NavLocation &loc2, const EDGE_BUNDLE &bundle, bool check=false) |
bool | addDualEdge (const NavLocation &loc1, const NavLocation &loc2) |
bool | addDualEdgeFast (const NavLocation &loc1, const NavLocation &loc2) |
bool | addDualEdgeFast (const NavLocation &loc1, const NavLocation &loc2, const EDGE_BUNDLE &edge1, const EDGE_BUNDLE &edge2) |
bool | mesh (std::vector< NavLocation > &locs) |
bool | connectInOutLocs (std::vector< NavLocation > &locs) |
bool | connect (NavLocation locToConnect, std::vector< NavLocation > &locs, bool verbose=false) |
bool | removeEdge (const NavLocation &loc1, const NavLocation &loc2) |
Removes an edge between two location nodes. | |
bool | removeDualEdge (const NavLocation &loc1, const NavLocation &loc2) |
bool | setVertexBundle (const NavLocation &loc, const VERTEX_BUNDLE &bundle) |
bool | setEdgeBundle (const Edge &e, const EDGE_BUNDLE &bundle) |
bool | setEdgeBundle (const Vertex &v1, const Vertex &v2, const EDGE_BUNDLE &bundle) |
bool | setEdgeBundle (const NavLocation &loc1, const NavLocation &loc2, const EDGE_BUNDLE &bundle, bool check=false) |
bool | getVertexBundle (const NavLocation &loc, VERTEX_BUNDLE &bundle, bool check=false) |
bool | getVertexBundle (const Vertex &v, VERTEX_BUNDLE &bundle) |
bool | getEdgeBundle (const Edge &e, EDGE_BUNDLE &bundle) |
Returns the bundled copy of an edge descriptor. | |
bool | getEdgeBundle (const Vertex &v1, const Vertex &v2, EDGE_BUNDLE &bundle) |
bool | getEdgeBundle (const NavLocation &loc1, const NavLocation &loc2, EDGE_BUNDLE &bundle, bool check=false) |
GraphContainer * | getGCtn () |
get pointer to the boost graph container object | |
void | clear () |
NavGraphT & | operator= (const NavGraphT &rhs) |
void | print () |
print the graph | |
Public Attributes | |
GraphContainer | graph |
Boost graph object. | |
PosToVertex | verticesMap |
int | xsize |
int | ysize |
Private Member Functions | |
bool | vertexExists (const int &posId) |
bool jafar::lgl::NavGraphT< EDGE_BUNDLE, VERTEX_BUNDLE, EDGE_WEIGHT_T >::getEdgeBundle | ( | const Edge & | e, |
EDGE_BUNDLE & | bundle | ||
) | [inline] |
Returns the bundled copy of an edge descriptor.
e | edge descriptor of which the bundle has to be extracted |
bundle | the extracted copy of the bundle |
Definition at line 528 of file Graphs.hpp.
bool jafar::lgl::NavGraphT< EDGE_BUNDLE, VERTEX_BUNDLE, EDGE_WEIGHT_T >::getVertex | ( | const NavLocation & | loc, |
Vertex & | v, | ||
bool | check = false |
||
) | [inline] |
The same as getVertex but check if vertex exists.
May be slower if called many times.
Definition at line 110 of file Graphs.hpp.
bool jafar::lgl::NavGraphT< EDGE_BUNDLE, VERTEX_BUNDLE, EDGE_WEIGHT_T >::removeEdge | ( | const NavLocation & | loc1, |
const NavLocation & | loc2 | ||
) | [inline] |
Removes an edge between two location nodes.
Definition at line 435 of file Graphs.hpp.
bool jafar::lgl::NavGraphT< EDGE_BUNDLE, VERTEX_BUNDLE, EDGE_WEIGHT_T >::removeEdgesOnly | ( | const NavLocation & | loc | ) | [inline] |
Removes only the edges of a graph's vertex.
Definition at line 236 of file Graphs.hpp.
References jafar::lgl::NavLocation::pos_x.
bool jafar::lgl::NavGraphT< EDGE_BUNDLE, VERTEX_BUNDLE, EDGE_WEIGHT_T >::removeInEdges | ( | const NavLocation & | loc | ) | [inline] |
Removes edges with destination vertex as loc.
Definition at line 277 of file Graphs.hpp.
References jafar::lgl::NavLocation::pos_x.
bool jafar::lgl::NavGraphT< EDGE_BUNDLE, VERTEX_BUNDLE, EDGE_WEIGHT_T >::removeOutEdges | ( | const NavLocation & | loc | ) | [inline] |
Removes edges with source vertex as loc.
Definition at line 254 of file Graphs.hpp.
References jafar::lgl::NavLocation::pos_x.
Generated on Wed Oct 15 2014 00:37:41 for Jafar by doxygen 1.7.6.1 |