PGROUTING
3.2
check_parameters.c
Go to the documentation of this file.
1
/*PGR-GNU*****************************************************************
2
File: astarOneToOne.c
3
4
Generated with Template by:
5
Copyright (c) 2015 pgRouting developers
6
Mail:
[email protected]
7
8
Function's developer:
9
Copyright (c) 2015 Celia Virginia Vergara Castillo
10
Mail:
11
12
------
13
14
This program is free software; you can redistribute it and/or modify
15
it under the terms of the GNU General Public License as published by
16
the Free Software Foundation; either version 2 of the License, or
17
(at your option) any later version.
18
19
This program is distributed in the hope that it will be useful,
20
but WITHOUT ANY WARRANTY; without even the implied warranty of
21
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
GNU General Public License for more details.
23
24
You should have received a copy of the GNU General Public License
25
along with this program; if not, write to the Free Software
26
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27
28
********************************************************************PGR-GNU*/
29
30
#include "
c_common/check_parameters.h
"
31
32
33
void
34
check_parameters
(
35
int
heuristic,
36
double
factor,
37
double
epsilon) {
38
if
(heuristic > 5 || heuristic < 0) {
39
ereport(ERROR,
40
(errmsg(
"Unknown heuristic"
),
41
errhint(
"Valid values: 0~5"
)));
42
}
43
if
(factor <= 0) {
44
ereport(ERROR,
45
(errmsg(
"Factor value out of range"
),
46
errhint(
"Valid values: positive non zero"
)));
47
}
48
if
(epsilon < 1) {
49
ereport(ERROR,
50
(errmsg(
"Epsilon value out of range"
),
51
errhint(
"Valid values: 1 or greater than 1"
)));
52
}
53
}
54
check_parameters
void check_parameters(int heuristic, double factor, double epsilon)
Definition:
check_parameters.c:34
check_parameters.h
src
common
check_parameters.c
Generated on Tue May 25 2021 15:09:47 for PGROUTING by
1.8.17