"uDist" Computing shortest path distance (hop count) for an unweighted similarity graph where 1=edge and 0=no edge (i.e. invoke knnGraph with weight=FALSE)
“uDist计算非加权相似图的最短路径距离(跳数),其中1 =边沿,0 =无边沿(即调用knnGraph重量= FALSE)
"floyd" Floyd's algorithm (SLOW) for computing shortest path distances (weighted hop count) for distance weighted graphs (i.e. invoke knnGraph with weight=TRUE).
(SLOW)“弗洛伊德”弗洛伊德的算法计算最短路径的距离(跳数加权)距离加权图(即调用knnGraph用重量= TRUE)。
用法----------Usage----------
floyd(x,verbose=FALSE)
uDist(g, k)
参数----------Arguments----------
参数:x
the adjacency n by n matrix (distance weighted)
邻接n×n矩阵(距离加权)
参数:verbose
print the progress for Floyd's algorithm
打印的进度Floyd的算法
参数:g
the adjacency n by n matrix (unweighted)
n×n矩阵的邻接(未加权)
参数:k
input parameter for determining the maximum distance to compute (a distance of greater than k is taken as infinity)
用于确定的最大距离的输入参数来计算的距离(大于k取为无穷大)
Details
详细信息----------Details----------
These implementations are not yet optimized for large data sets (>5000 observations)
这些尚未实现优化的大型数据集(> 5000观察)