algorithmCompute method

void algorithmCompute(
  1. GraphAlgorithm? algorithm
)

Recursively call the compute method of the algorithm, and then call the compute method of the next algorithm 递归调用算法的compute方法,然后调用下一个算法的compute方法

Implementation

void algorithmCompute(GraphAlgorithm? algorithm) {
  if (algorithm == null) return;
  algorithm.compute(vertex, graph);
  algorithmCompute(algorithm.decorator);
}