首页 > 解决方案 > Neo4j APOC A* 通过路径

问题描述

我正在尝试使用 APOC A* 进行路由:

match(s:Station {Name: "A"}), (e:Station { Name: "B"})
CALL apoc.algo.aStar(s, e,'Road>' ,'Length','Lat','Lon') YIELD path, weight
RETURN path, weight LIMIT 1

我将如何通过任何通过点指定?目前我必须将完整路径拆分为块 A -> B、B -> C、C -> D 等等。

public class Station {

    public long Id {get;set;}

    public string Name {get;set;}

    public double Lat {get;set;}

    public double Lon {get;set;}

}

public class Road {

    public double Length {get;set;}

}

谢谢。

标签: c#neo4jcypherneo4j-apoc

解决方案


推荐阅读