HOG2
abstractionalgorithms
AStar2.cpp
Go to the documentation of this file.
1
/*
2
* $Id: aStar2.cpp
3
* hog2
4
*
5
* Created by Nathan Sturtevant on 9/29/04.
6
* Modified by Nathan Sturtevant on 02/29/20.
7
*
8
* This file is part of HOG2. See https://github.com/nathansttt/hog2 for licensing information.
9
*
10
*/
11
12
#include "
AStar2.h
"
13
14
using namespace
GraphAbstractionConstants
;
15
16
path
*
aStar2::GetPath
(
GraphAbstraction
*aMap,
node
*from,
node
*to,
reservationProvider
*)
17
{
18
if
((from == 0) || (to == 0) || (from == to))
19
return
0;
20
path
*lastPath = 0;
21
map = aMap;
22
23
std::vector<unsigned int> eligibleNodeParents;
24
25
lastPath = getAbstractPath(map->GetAbstractGraph(from->
GetLabelL
(
kAbstractionLevel
)),
26
from->
GetNum
(), to->
GetLabelL
(
kParent
),
27
eligibleNodeParents,
28
kTemporaryLabel
,
29
to->
GetNum
());
30
return
lastPath;
31
}
32
GraphAbstraction
A generic class for basic operations on Graph abstractions.
Definition:
GraphAbstraction.h:63
GraphAbstractionConstants
Definition:
GraphAbstraction.h:22
aStar2::GetPath
path * GetPath(GraphAbstraction *aMap, node *from, node *to, reservationProvider *rp=0)
Definition:
AStar2.cpp:16
GraphAbstractionConstants::kAbstractionLevel
@ kAbstractionLevel
Definition:
GraphAbstraction.h:25
AStar2.h
node::GetNum
unsigned int GetNum() const
Definition:
Graph.h:176
GraphAbstractionConstants::kTemporaryLabel
@ kTemporaryLabel
Definition:
GraphAbstraction.h:29
reservationProvider
Definition:
ReservationProvider.h:33
GraphAbstractionConstants::kParent
@ kParent
Definition:
GraphAbstraction.h:27
node::GetLabelL
long GetLabelL(unsigned int index) const
Definition:
Graph.h:220
path
A linked list of nodes which form a continuous path.
Definition:
Path.h:20
node
Nodes to be stored within a Graph.
Definition:
Graph.h:170
Generated by
1.8.17