Skip to content
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

Merged
merged 13 commits into from
Jun 10, 2023

Conversation

Aniket-debug
Copy link
Contributor

@Aniket-debug Aniket-debug commented Jun 6, 2023

Added overloads:

  • one to many
  • many to one
  • many to many
  • combinations

@pgRouting/admins

@Aniket-debug Aniket-debug changed the title added one-to-many overload and try to run pgtap on ksp GSoC 2023: Aniket Agarwal Week 2 Jun 6, 2023
@Aniket-debug Aniket-debug merged commit 7cdc7a2 into pgRouting:Aniket-2023 Jun 10, 2023
7 of 12 checks passed
@@ -3,7 +3,8 @@ build
fix_typos
code_linter
src/version/version.h

run.sh
Copy link
Member

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.

git status
On branch foo
Your branch is up to date with 'origin/foo'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	after.txt
	astar_benchmark.pg
	before.txt
	change.sh
	commitByDirectory.sh
	commitBySubDirectory.sh
	commits.sh
	contributions.txt
	contributors.txt
	dmain.txt
	errs.txt
	exe.sh
	get_contributors.sh
	info.txt
	install-all.sh
	install-old-version.sh
	install-one.sh
	instructions.sh
	nmain.txt
	node_change.txt
	orderedinfo.txt
	page_history_gh_page.js
	patch.cpp
	pge_history_main.js
	run.sh
	taptest-4.sh
	taptest.sh
	update3.4.sh
	v4.sh

@@ -35,6 +35,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#endif

struct Path_rt {
/*Added route_id*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modifying types will cause a lot of problems on the other functions.
I suggest you look how things are handled when there is an identifier of a route on the output.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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?

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use at instead of @ one of our goals for v4 is to not have clickable mails to avoid unwanted mails from robots

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vicky at erosion.dev

@@ -28,10 +31,57 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
---------------

--v2.6
-- CREATE FUNCTION _pgr_ksp(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are marking a function for deletion, in SQL use /* */ to wrap the unwanted code
and a -- TODO if 0 <--- makes it easier to find the unwanted code that was forgotten to remove

Copy link
Member

Choose a reason for hiding this comment

The 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.
TRSP had a similar problem and the way around was:

CREATE FUNCTION _v4trsp(

As you can see the old function remains, but the new one to be kept on v4 is named differently.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, Got it Thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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. TRSP had a similar problem and the way around was:

CREATE FUNCTION _v4trsp(

As you can see the old function remains, but the new one to be kept on v4 is named differently.

Can I change SQL function?

int64_t start_vid,
int64_t end_vid,

II_t_rt *combinations,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove name of parameters in header files

Aniket-debug added a commit to Aniket-debug/GSoC-pgRouting that referenced this pull request Aug 22, 2023
* added one-to-many overload and try to run pgtap on ksp

* removed white spaces at the end of the lines

* update function's developer

* added overloads

* fixing the errors

* fixing more errors

* added function's developer and updates in .hpp

* fixed error of algorithm

* fix the start_id and route_id problem

* changes in ksp.sql to pass tests

* fixing linting

* fixing linter

* added name in contributor list and added namspace comment
Aniket-debug added a commit to Aniket-debug/GSoC-pgRouting that referenced this pull request Aug 23, 2023
* added one-to-many overload and try to run pgtap on ksp

* removed white spaces at the end of the lines

* update function's developer

* added overloads

* fixing the errors

* fixing more errors

* added function's developer and updates in .hpp

* fixed error of algorithm

* fix the start_id and route_id problem

* changes in ksp.sql to pass tests

* fixing linting

* fixing linter

* added name in contributor list and added namspace comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants