fscanf(file, "%d", &iVertexNum); // Read number of Vertices

double **G = (double **)malloc(iVertexNum * sizeof(*G));
for (i = 0; i < iVertexNum; i++)
    G[i] = (double *)malloc(iVertexNum * sizeof(*G[i]));

主要避免实验时邻接矩阵时节点过多无法使用一般数组存储。 

相关文章:

  • 2021-07-08
  • 2021-08-19
  • 2022-12-23
  • 2021-12-28
  • 2021-11-07
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案