|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.hankcs.hanlp.seg.NShort.Path.NShortPath
public class NShortPath
| 构造方法摘要 | |
|---|---|
NShortPath(Graph graph,
int N)
构造一个N最短路径计算器 |
|
| 方法摘要 | |
|---|---|
Integer[] |
getBestPath()
获取唯一一条最短路径,当然最短路径可能不只一条 |
List<int[]> |
getNPaths()
获取前10条最短路径 |
List<int[]> |
getNPaths(int n)
从短到长获取至多 n 条路径 |
List<int[]> |
getPaths(int index)
获取前index+1短的路径 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public NShortPath(Graph graph,
int N)
graph - 要计算的图N - 要计算前几条最短路径,当然结果不一定就是N条| 方法详细信息 |
|---|
public List<int[]> getPaths(int index)
index - index = 0 : 最短的路径; index = 1 : 次短的路径, 依此类推。index <= this.N
public Integer[] getBestPath()
public List<int[]> getNPaths(int n)
n -
public List<int[]> getNPaths()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||