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

Fixes #2402: See if we can make the aStar algorithm support spatial points #2589

Merged
merged 2 commits into from
Apr 21, 2022

Conversation

vga91
Copy link
Collaborator

@vga91 vga91 commented Mar 1, 2022

Fixes #2402

Added config 'pointPropName' in apoc.algo.aStarConfig procedure.
Extracted code from org.neo4j.graphalgo.impl.util.GeoEstimateEvaluator

@Lojjs Lojjs added 4.4 core-functionality Adding new procedure, function or signature to APOC core labels Mar 28, 2022
@Context
public GraphDatabaseService db;

@Context
public Transaction tx;

@Procedure
@Description("apoc.algo.aStarWithPoint(startNode, endNode, 'relTypesAndDirs', 'distance','pointProp') - " +
Copy link
Contributor

Choose a reason for hiding this comment

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

We have started to be stricter about what will be added into APOC core. Would it be possible to add this into APOC full instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes sure, I just moved it in full

@Lojjs Lojjs self-assigned this Apr 19, 2022
@@ -45,8 +94,8 @@ public Stream<WeightedPathResult> aStar(
}

@Procedure
@Description("apoc.algo.aStar(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', {weight:'dist',default:10," +
"x:'lon',y:'lat'}) YIELD path, weight - run A* with relationship property name as cost function")
@Description("apoc.algo.aStarConfig(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', {weight:'dist',default:10," +
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch that this description was wrong 👍

Copy link
Contributor

@Lojjs Lojjs left a comment

Choose a reason for hiding this comment

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

As far as I can judge, this looks OK

@Lojjs Lojjs merged commit 3adc9b9 into neo4j-contrib:4.4 Apr 21, 2022
Lojjs pushed a commit that referenced this pull request Apr 21, 2022
Lojjs pushed a commit that referenced this pull request Apr 21, 2022
Lojjs added a commit that referenced this pull request Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.4 core-functionality Adding new procedure, function or signature to APOC core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

See if we can make the aStar algorithm support spatial points
2 participants