Skip to content

Commit

Permalink
Merge pull request #311 from aryan1010/aryan-week-5
Browse files Browse the repository at this point in the history
GSoC 2023: Aryan Gupta week 5
  • Loading branch information
aryan1010 committed Jul 2, 2023
2 parents 658ce75 + 30706ad commit 184ebd0
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 36 deletions.
6 changes: 3 additions & 3 deletions docqueries/driving_distance/pgr_drivingDistance.result
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BEGIN
SET client_min_messages TO NOTICE;
SET
/* --q5 */
SELECT * FROM pgr_drivingDistance(
SELECT * FROM pgr_v4drivingDistance(
'SELECT id, source, target, cost, reverse_cost FROM edges',
11, 3.0);
seq | start_vid | node | edge | cost | agg_cost
Expand All @@ -24,7 +24,7 @@ SELECT * FROM pgr_drivingDistance(
(13 rows)

/* --q6 */
SELECT * FROM pgr_drivingDistance(
SELECT * FROM pgr_v4drivingDistance(
'SELECT id, source, target, cost, reverse_cost FROM edges',
array[11, 16], 3.0, equicost => true);
seq | start_vid | node | edge | cost | agg_cost
Expand All @@ -45,7 +45,7 @@ SELECT * FROM pgr_drivingDistance(
(13 rows)

/* --q10 */
SELECT * FROM pgr_drivingDistance(
SELECT * FROM pgr_v4drivingDistance(
'SELECT id, source, target, cost, reverse_cost FROM edges',
array[11, 16], 3.0, directed => false);
seq | start_vid | node | edge | cost | agg_cost
Expand Down
8 changes: 4 additions & 4 deletions docqueries/driving_distance/pgr_drivingDistance.test.sql
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
-- CopyRight(c) pgRouting developers
-- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/
/* --q5 */
SELECT * FROM pgr_drivingDistance(
SELECT * FROM pgr_v4drivingDistance(
'SELECT id, source, target, cost, reverse_cost FROM edges',
11, 3.0);
/* --q6 */
SELECT * FROM pgr_drivingDistance(
SELECT * FROM pgr_v4drivingDistance(
'SELECT id, source, target, cost, reverse_cost FROM edges',
ARRAY[11, 16], 3.0, equicost => true);
array[11, 16], 3.0, equicost => true);
/* --q10 */
SELECT * FROM pgr_drivingDistance(
SELECT * FROM pgr_v4drivingDistance(
'SELECT id, source, target, cost, reverse_cost FROM edges',
array[11, 16], 3.0, directed => false);
/* --q15 */
15 changes: 8 additions & 7 deletions include/c_types/path_rtdd.h → include/c_types/path_dd_rt.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/*PGR-GNU*****************************************************************
File: path_rtdd.h
File: path_dd_rt.h
Copyright (c) 2015 Celia Virginia Vergara Castillo
Mail: vicky AT erosion.dev
Generated with Template by:
Copyright (c) 2023 pgRouting developers
Mail: project AT pgrouting.org
Copyright (c) 2023 Aryan Gupta
Mail: guptaaryan1010 AT gmail.com
Expand All @@ -26,8 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/
/*! @file */

#ifndef INCLUDE_C_TYPES_path_rtdd_H_
#define INCLUDE_C_TYPES_path_rtdd_H_
#ifndef INCLUDE_C_TYPES_PATH_DD_RT_H_
#define INCLUDE_C_TYPES_PATH_DD_RT_H_
#pragma once

/* for int64_t */
Expand All @@ -37,7 +38,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# include <stdint.h>
#endif

struct path_rtdd {
struct path_dd_rt {
int seq;
int64_t depth;
int64_t start_id;
Expand All @@ -48,4 +49,4 @@ struct path_rtdd {
double agg_cost;
};

#endif // INCLUDE_C_TYPES_path_rtdd_H_
#endif // INCLUDE_C_TYPES_PATH_DD_RT_H_
11 changes: 4 additions & 7 deletions include/dijkstra/v4drivingDist.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/*PGR-GNU*****************************************************************
file: driveDist.hpp
file: v4drivingDist.hpp
Copyright (c) 2015 pgRouting developers
Mail: [email protected]
Copyright (c) 2022 Celia Virginia Vergara Castillo
Copyright (c) 2015 Celia Virginia Vergara Castillo
vicky at erosion.dev
Generated with Template by:
Copyright (c) 2023 pgRouting developers
Mail: project AT pgrouting.org
Copyright (c) 2023 Aryan Gupta
guptaaryan1010 AT gmail.com
Expand Down
13 changes: 7 additions & 6 deletions include/drivers/driving_distance/v4drivedist_driver.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/*PGR-GNU*****************************************************************
File: boost_interface_drivedist.h
File: v4drivedist_driver.h
Copyright (c) 2015 Celia Virginia Vergara Castillo
vicky at erosion.dev
Generated with Template by:
Copyright (c) 2023 pgRouting developers
Mail: project AT pgrouting.org
Copyright (c) 2023 Aryan Gupta
guptaaryan1010 AT gmail.com
Expand All @@ -24,8 +25,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

#ifndef INCLUDE_DRIVERS_DRIVING_DISTANCE_v4drivedist_driver_H_
#define INCLUDE_DRIVERS_DRIVING_DISTANCE_v4drivedist_driver_H_
#ifndef INCLUDE_DRIVERS_DRIVING_DISTANCE_V4DRIVEDIST_DRIVER_H_
#define INCLUDE_DRIVERS_DRIVING_DISTANCE_V4DRIVEDIST_DRIVER_H_

/* for size-t */
#ifdef __cplusplus
Expand Down Expand Up @@ -59,4 +60,4 @@ extern "C" {
}
#endif

#endif // INCLUDE_DRIVERS_DRIVING_DISTANCE_v4drivedist_driver_H_
#endif //INCLUDE_DRIVERS_DRIVING_DISTANCE_V4DRIVEDIST_DRIVER_H_
3 changes: 3 additions & 0 deletions sql/sigs/pgrouting--3.6.sig
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ pgr_dijkstravia(text,anyarray,boolean,boolean,boolean)
_pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)
pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)
pgr_drivingdistance(text,bigint,double precision,boolean)
_pgr_v4drivingdistance(text,anyarray,double precision,boolean,boolean)
pgr_v4drivingdistance(text,anyarray,double precision,boolean,boolean)
pgr_v4drivingdistance(text,bigint,double precision,boolean)
_pgr_edgecoloring(text)
pgr_edgecoloring(text)
_pgr_edgedisjointpaths(text,anyarray,anyarray,boolean)
Expand Down
2 changes: 2 additions & 0 deletions src/driving_distance/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
ADD_LIBRARY(driving_distance OBJECT
many_to_dist_driving_distance.c
many_to_dist_withPointsDD.c
v4driving_distance.c

drivedist_driver.cpp
withPoints_dd_driver.cpp
v4drivedist_driver.cpp
)
7 changes: 4 additions & 3 deletions src/driving_distance/v4drivedist_driver.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/*PGR-GNU*****************************************************************
File: drivedist_driver.cpp
File: v4drivedist_driver.cpp
Copyright (c) 2015 Celia Virginia Vergara Castillo
Mail: vicky at erosion.dev
Generated with Template by:
Copyright (c) 2023 pgRouting developers
Mail: project AT pgrouting.org
Copyright (c) 2023 Aryan Gupta
guptaaryan1010 AT gmail.com
Expand Down
13 changes: 7 additions & 6 deletions src/driving_distance/v4driving_distance.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/*PGR-GNU*****************************************************************
File: many_to_dist_driving_distance.c
File: v4driving_distance.c
Copyright (c) 2015 Celia Virginia Vergara Castillo
vicky at erosion.dev
Generated with Template by:
Copyright (c) 2023 pgRouting developers
Mail: project AT pgrouting.org
Copyright (c) 2023 Aryan Gupta
guptaaryan1010 AT gmail.com
Expand Down Expand Up @@ -33,7 +34,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include "c_common/time_msg.h"

#include "c_common/pgdata_getters.h"
#include "drivers/driving_distance/drivedist_driver.h"
#include "drivers/driving_distance/v4drivedist_driver.h"


PGDLLEXPORT Datum _pgr_v4drivingdistance(PG_FUNCTION_ARGS);
Expand Down Expand Up @@ -69,7 +70,7 @@ void process(

PGR_DBG("Starting timer");
clock_t start_t = clock();
do_pgr_driving_many_to_dist(
do_pgr_v4driving_many_to_dist(
edges, total_tuples,
start_vidsArr, size_start_vidsArr,
distance,
Expand All @@ -80,7 +81,7 @@ void process(
&notice_msg,
&err_msg);

time_msg("processing pgr_drivingDistance()",
time_msg("processing pgr_v4drivingDistance()",
start_t, clock());

if (err_msg && (*result_tuples)) {
Expand Down

0 comments on commit 184ebd0

Please sign in to comment.