Fawkes API
Fawkes Development Version
edge_cost_constraint.h
1
/***************************************************************************
2
* edge_cost_constraint.h - base class for edge cost constraints
3
*
4
* Created: Fri Jul 18 12:08:41 2014
5
* Copyright 2014 Tim Niemueller
6
****************************************************************************/
7
8
/* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Library General Public License for more details.
17
*
18
* Read the full text in the LICENSE.GPL file in the doc directory.
19
*/
20
21
#ifndef _NAVGRAPH_CONSTRAINTS_EDGE_COST_CONSTRAINT_H_
22
#define _NAVGRAPH_CONSTRAINTS_EDGE_COST_CONSTRAINT_H_
23
24
#include <navgraph/navgraph_node.h>
25
26
#include <string>
27
#include <vector>
28
29
namespace
fawkes
{
30
31
class
Logger;
32
33
class
NavGraphEdgeCostConstraint
34
{
35
public
:
36
NavGraphEdgeCostConstraint
(std::string &
name
);
37
NavGraphEdgeCostConstraint
(
const
char
*
name
);
38
virtual
~NavGraphEdgeCostConstraint
();
39
40
std::string
name
();
41
42
virtual
bool
compute
(
void
)
throw
();
43
virtual
float
cost_factor
(
const
fawkes::NavGraphNode
&from,
44
const
fawkes::NavGraphNode
&to)
throw
() = 0;
45
46
bool
operator==
(
const
std::string &
name
)
const
;
47
48
protected
:
49
std::string
name_
;
50
};
51
52
}
// end namespace fawkes
53
54
#endif
fawkes::NavGraphNode
Definition:
navgraph_node.h:38
fawkes::NavGraphEdgeCostConstraint::name_
std::string name_
Definition:
edge_cost_constraint.h:52
fawkes::NavGraphEdgeCostConstraint::compute
virtual bool compute(void)
Perform compuations before graph search and to indicate re-planning.
Definition:
edge_cost_constraint.cpp:106
fawkes::NavGraphEdgeCostConstraint::cost_factor
virtual float cost_factor(const fawkes::NavGraphNode &from, const fawkes::NavGraphNode &to)=0
fawkes::NavGraphEdgeCostConstraint::operator==
bool operator==(const std::string &name) const
Check if constraint matches name.
Definition:
edge_cost_constraint.cpp:117
fawkes
fawkes::NavGraphEdgeCostConstraint::~NavGraphEdgeCostConstraint
virtual ~NavGraphEdgeCostConstraint()
Virtual empty destructor.
Definition:
edge_cost_constraint.cpp:74
fawkes::NavGraphEdgeCostConstraint::NavGraphEdgeCostConstraint
NavGraphEdgeCostConstraint(std::string &name)
Constructor.
Definition:
edge_cost_constraint.cpp:60
fawkes::NavGraphEdgeCostConstraint::name
std::string name()
Get name of constraint.
Definition:
edge_cost_constraint.cpp:82
src
libs
navgraph
constraints
edge_cost_constraint.h
Generated by
1.8.16