dart_graph library

Extension Types

Angle

Extensions

AStarExtension on Graph<V, E>
BellmanFordExtension on Graph<V, E>
最短路径:贝尔曼-福特算法 适用于负加权和正加权边。还可以检测负权重循环。返回最短路径和路径。
BFSExtension on Graph<V, E>
基于邻接表遍历,性能为 O(V+E)
BlossomAlgorithm on Graph<V, E>
一般图最大匹配算法 (Edmonds' Blossom Algorithm) 时间复杂度: O(V^3)
ConnectedComponentsExtension on Graph<V, E>
计算图的连通分量 如果图是有向的,该算法将其视为无向图处理(即计算弱连通分量)。 返回一个列表,其中每个元素都是一个连通分量(由 Vertex 组成的列表)。
CurveExt on Iterable<Curve?>
CycleDetection on Graph<V, E>
循环检测
DFSExtension on Graph<V, E>
DijkstraExtension on Graph<V, E>
DTSCoordinateExt on Coordinate
DTSPointExt on Point
DTSRectExt on Envelope
FloydWarshallExtension on Graph<V, E>
Floyd-Warshall 算法 计算图中所有顶点对之间的最短路径。 支持负权边,但不支持负权环。 时间复杂度: O(V^3)
JohnsonExt on Graph<V, E>
Johnson 算法 用于在包含负权边(但无负权环)的稀疏图中,计算所有顶点对之间的最短路径。 返回: Map<起点, Map<终点, 路径列表>>
KruskalExtension on Graph<V, E>
Kruskal 最小生成树算法 仅适用于无向图 时间复杂度: O(E log E)
NumberExt on num
OffsetExt on Offset
PathExt on Path
PrimExtension on Graph<V, E>
Prim 的最小生成树。仅适用于无向图。它找到一个 边的子集,该子集形成一个包含每个顶点的树,其中 树中所有边的总重量最小化。 时间复杂度: O(E log E)
RectExt on Rect
RRectExt on RRect
TopologicalSortExtension on Graph<V, E>
拓扑排序 (Kahn's Algorithm) 返回拓扑排序后的顶点列表
TreeExt on Tree<T>
TurboMatching on Graph<V, E>
最大匹配算法扩展 注意:此算法主要适用于 二分图。 对于一般图(包含奇数长度循环的图),此算法可能无法找到最大匹配。

Properties

geomFactory → GeometryFactory
final

Functions

computeCircleSegments(double radius, {double maxError = 0.1}) int

Typedefs

Accessor<T> = double Function(T data)
HeuristicCallback<V> = double Function(Vertex<V> current, Vertex<V> goal)
INodeCreator<T> = BSNode<T> Function(BSNode<T>? parent, T id)
QuadTreeVisitor<T> = VisitResult Function(QuadNode<T> node, double x0, double y0, double x1, double y1)
RTreeVisitor<T> = VisitResult Function(RNode<T> node)
TreeVisitor<T> = VisitResult Function(TreeNode<T> node)