SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. match (n)-[r]->(m) return n,r,m;
  3.  
  4.  
  5. match (n) optional match (n)-[r]-() delete n,r;
  6.  
  7.  
  8.  
  9.  
  10. MATCH(startNode:sNode {name:"Start"}),(endNode:eNode{name:"Finish"})
  11. call apoc.algo.dijkstra(startNode, endNode, 'Road', 'Distance')YIELD
  12. path, weight RETURN path;
  13.  
  14.  
  15.  
  16.  
  17.  
  18. Create
  19. (n0:sNode {name:"Start"}),
  20. (n1:Intersection {name:"1"}),
  21. (n2:Intersection {name:"2"}),
  22. (n3:eNode {name:"Finish"}),
  23. (n4:Intersection {name:"4"}),
  24. (n5:Intersection {name:"5"}),
  25. (n6:Intersection {name:"6"}),
  26. (n7:Intersection {name:"7"}),
  27. (n8:Intersection {name:"8"}),
  28. (n9:Intersection {name:"9"}),
  29. (n10:Intersetion {name:"10"}),
  30. (n11:Intersetion {name:"11"}),
  31. (n12:Intersetion {name:"12"}),
  32. (n13:Intersetion {name:"13"}),
  33. (n14:Intersetion {name:"14"}),
  34. (n15:Intersetion {name:"15"}),
  35. (n16:Intersetion {name:"16"}),
  36. (n17:Intersetion {name:"17"}),
  37. (n18:Intersetion {name:"18"}),
  38. (n19:Intersetion {name:"19"}),
  39.  
  40. (n0)-[:Road {Distance:5,Coverability:1}]->(n4),
  41. (n4)-[:Road {Distance:15,Coverability:1}]->(n5),
  42. (n5)-[:Road {Distance:5,Coverability:1}]->(n6),
  43. (n6)-[:Road {Distance:100,Coverability:1}]->(n7),
  44. (n7)-[:Road {Distance:80,Coverability:0.9}]->(n8),
  45. (n0)-[:Road {Distance:100,Coverability:0.9}]->(n9),
  46. (n9)-[:Road {Distance:10,Coverability:0.8}]->(n10),
  47. (n10)-[:Road {Distance:10,Coverability:0.8}]->(n1),
  48. (n1)-[:Road {Distance:5,Coverability:0.8}]->(n11),
  49. (n11)-[:Road {Distance:10,Coverability:0.8}]->(n12),
  50. (n12)-[:Road {Distance:30,Coverability:0.8}]->(n13),
  51. (n13)-[:Road {Distance:60,Coverability:0.8}]->(n2),
  52. (n1)-[:Road {Distance:5,Coverability:0.8}]->(n8),
  53. (n8)-[:Road {Distance:105,Coverability:0.9}]->(n14),
  54. (n2)-[:Road {Distance:15,Coverability:0.8}]->(n15),
  55. (n15)-[:Road {Distance:75,Coverability:0.9}]->(n3),
  56. (n2)-[:Road {Distance:20,Coverability:0.7}]->(n16),
  57. (n16)-[:Road {Distance:15,Coverability:0.9}]->(n17),
  58. (n17)-[:Road {Distance:75,Coverability:1}]->(n3),
  59. (n2)-[:Road {Distance:5,Coverability:0.9}]->(n14),
  60. (n14)-[:Road {Distance:40,Coverability:0.9}]->(n18),
  61. (n18)-[:Road {Distance:40,Coverability:0.9}]->(n19),
  62. (n19)-[:Road {Distance:70,Coverability:1}]->(n3);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top