-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GSoC 2023: Aniket Agarwal Week 2 #295
Changes from all commits
960c67d
7850432
583e245
9db794d
a18368f
c3975f0
48160f0
c6e6cd4
4db7a58
2a1b0ce
0a8284c
e25ff16
3a4d1d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ build | |
fix_typos | ||
code_linter | ||
src/version/version.h | ||
|
||
run.sh | ||
taptest.sh | ||
.DS_Store | ||
.vagrant | ||
.directory | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
#endif | ||
|
||
struct Path_rt { | ||
/*Added route_id*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Modifying types will cause a lot of problems on the other functions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay, that makes sense could you please tell me the name of the function that outputs path_id except pgr_ksp? |
||
int16_t route_id; | ||
int seq; | ||
int64_t start_id; | ||
int64_t end_id; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ File: ksp_driver.h | |
Copyright (c) 2015 Celia Virginia Vergara Castillo | ||
Mail: vicky_vergara@hotmail.com | ||
|
||
Copyright (c) 2023 Aniket Agarwal | ||
Mail: aniketgarg187@gmail.com | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. vicky at erosion.dev |
||
|
||
------ | ||
|
||
This program is free software; you can redistribute it and/or modify | ||
|
@@ -32,11 +35,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
# include <cstddef> | ||
using Edge_t = struct Edge_t; | ||
using Path_rt = struct Path_rt; | ||
using II_t_rt = struct II_t_rt; | ||
#else | ||
# include <stddef.h> | ||
# include <stdint.h> | ||
typedef struct Edge_t Edge_t; | ||
typedef struct Path_rt Path_rt; | ||
typedef struct II_t_rt II_t_rt; | ||
#endif | ||
|
||
|
||
|
@@ -47,13 +52,23 @@ extern "C" { | |
void do_pgr_ksp( | ||
Edge_t *data_edges, | ||
size_t total_edges, | ||
int64_t start_vid, | ||
int64_t end_vid, | ||
|
||
II_t_rt *combinations, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove name of parameters in header files |
||
size_t total_combinations, | ||
|
||
int64_t *start_vids, | ||
size_t size_start_vids, | ||
int64_t *end_vids, | ||
size_t size_end_vids, | ||
|
||
size_t K, | ||
|
||
bool directed, | ||
bool heap_paths, | ||
|
||
Path_rt **return_tuples, | ||
size_t *return_count, | ||
|
||
char ** log_msg, | ||
char ** notice_msg, | ||
char ** err_msg); | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,6 +4,9 @@ File: _ksp.sql | |||||
Copyright (c) 2015 Celia Virginia Vergara Castillo | ||||||
vicky_vergara@hotmail.com | ||||||
|
||||||
Copyright (c) 2023 Aniket Agarwal | ||||||
aniketgarg187@gmail.com | ||||||
|
||||||
------ | ||||||
|
||||||
This program is free software; you can redistribute it and/or modify | ||||||
|
@@ -28,10 +31,57 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |||||
--------------- | ||||||
|
||||||
--v2.6 | ||||||
-- CREATE FUNCTION _pgr_ksp( | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you are marking a function for deletion, in SQL use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forgot to mention, you can not delete an SQL function, this is a 3.6.0 which can only add functions from 3.5, you will have problems when testing updates. GSoC-pgRouting/sql/trsp/_trsp.sql Line 59 in 81bcd0c
As you can see the old function remains, but the new one to be kept on v4 is named differently. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay, Got it Thank you. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Can I change SQL function? |
||||||
-- edges_sql TEXT, | ||||||
-- start_vid INTEGER, | ||||||
-- end_vid INTEGER, | ||||||
-- k INTEGER, | ||||||
|
||||||
-- directed BOOLEAN, | ||||||
-- heap_paths BOOLEAN, | ||||||
|
||||||
-- OUT seq INTEGER, | ||||||
-- OUT path_id INTEGER, | ||||||
-- OUT path_seq INTEGER, | ||||||
-- OUT start_vid BIGINT, | ||||||
-- OUT end_vid BIGINT, | ||||||
-- OUT node BIGINT, | ||||||
-- OUT edge BIGINT, | ||||||
-- OUT cost FLOAT, | ||||||
-- OUT agg_cost FLOAT) | ||||||
-- RETURNS SETOF RECORD AS | ||||||
-- 'MODULE_PATHNAME' | ||||||
-- LANGUAGE C VOLATILE STRICT; | ||||||
|
||||||
|
||||||
--v3.6 | ||||||
CREATE FUNCTION _pgr_ksp( | ||||||
edges_sql TEXT, | ||||||
start_vids ANYARRAY, | ||||||
end_vids ANYARRAY, | ||||||
k INTEGER, | ||||||
|
||||||
directed BOOLEAN, | ||||||
heap_paths BOOLEAN, | ||||||
|
||||||
OUT seq INTEGER, | ||||||
OUT path_id INTEGER, | ||||||
OUT path_seq INTEGER, | ||||||
OUT start_vid BIGINT, | ||||||
OUT end_vid BIGINT, | ||||||
OUT node BIGINT, | ||||||
OUT edge BIGINT, | ||||||
OUT cost FLOAT, | ||||||
OUT agg_cost FLOAT) | ||||||
RETURNS SETOF RECORD AS | ||||||
'MODULE_PATHNAME' | ||||||
LANGUAGE C VOLATILE STRICT; | ||||||
|
||||||
--v3.6 | ||||||
CREATE FUNCTION _pgr_ksp( | ||||||
edges_sql TEXT, | ||||||
start_vid BIGINT, | ||||||
end_vid BIGINT, | ||||||
combinations TEXT, | ||||||
|
||||||
k INTEGER, | ||||||
|
||||||
directed BOOLEAN, | ||||||
|
@@ -40,6 +90,8 @@ CREATE FUNCTION _pgr_ksp( | |||||
OUT seq INTEGER, | ||||||
OUT path_id INTEGER, | ||||||
OUT path_seq INTEGER, | ||||||
OUT start_vid BIGINT, | ||||||
OUT end_vid BIGINT, | ||||||
OUT node BIGINT, | ||||||
OUT edge BIGINT, | ||||||
OUT cost FLOAT, | ||||||
|
@@ -50,5 +102,8 @@ LANGUAGE C VOLATILE STRICT; | |||||
|
||||||
-- COMMENTS | ||||||
|
||||||
COMMENT ON FUNCTION _pgr_ksp(TEXT, BIGINT, BIGINT, INTEGER, BOOLEAN, BOOLEAN) | ||||||
COMMENT ON FUNCTION _pgr_ksp(TEXT, ANYARRAY, ANYARRAY, INTEGER, BOOLEAN, BOOLEAN) | ||||||
IS 'pgRouting internal function'; | ||||||
|
||||||
COMMENT ON FUNCTION _pgr_ksp(TEXT, TEXT, INTEGER, BOOLEAN, BOOLEAN) | ||||||
IS 'pgRouting internal function'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this is ok in this GSoC repository, this change would be unacceptable in the pgRouting repository.
You need to learn to live with the files that are "helper" files for the development you are doing, past present of future
For example, in my case I have zillions of files I have to see when I do a
git status
, and I live with them. Either I used them in the past, or I am using them, or I am preparing something for the future.But none of them are to be included in the repository.