From 8a8dc6a5b8d925535fa5401ec4e822ae723a7864 Mon Sep 17 00:00:00 2001 From: medina5 Date: Mon, 27 Oct 2025 07:57:37 +0100 Subject: [PATCH] =?UTF-8?q?Pr=C3=A9cisions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exercice2.md | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/exercice2.md b/exercice2.md index 73fb37b..8531455 100644 --- a/exercice2.md +++ b/exercice2.md @@ -60,7 +60,7 @@ MATCH (p:Point) DETACH DELETE p; 2. Quel est le plus court chemin entre le casino et la falaise -a. Un chemin comportant au maximum 8 segments (mais ce n'est pas le plus court !) +a. Un chemin comportant au maximum 8 segments (mais il ne prend pas en compte les coûts, ce n'est pas le plus rapide !) ![](route.png) @@ -68,20 +68,6 @@ Utilisation de la fonction dijkstra de la bibliothèque GDS [49, 54, 46, 28, 45, 24, 23, 13, 6, 7, 2, 1, 8, 9, 18, 19, 20, 57, 21, 31, 38, 39, 40, 58] -```cypher -MATCH (source:Point {id: 49}), (target:Point {id: 58}) -CALL gds.shortestPath.dijkstra.stream('routes_graph', { - sourceNode: source, - targetNode: target, - relationshipWeightProperty: 'cout' -}) -YIELD nodeIds, totalCost -UNWIND range(0, size(nodeIds)-2) AS i -MATCH (n1) WHERE id(n1) = nodeIds[i] -MATCH (n2) WHERE id(n2) = nodeIds[i+1] -MATCH path = (n1)-[r:ROUTE]->(n2) -RETURN collect(path) AS chemin, totalCost; -``` ## Réseau d'amis