?? graphalgori.cpp
字號:
// GraphAlgori.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "CGraphAlgori.h"
int main(int argc, char* argv[])
{
// printf("Hello World!\n");
// return 0;
// PathSE.resize(5);
// PathSE.push_back(2);
// PathSE.push_back(5);
CGraphAlgori GraAlg;
double dInf = INF;
double R1[25] = { 0, 50, dInf, dInf, dInf,
dInf, 0, dInf, dInf, 80,
dInf, 30, 0, 20, dInf,
dInf, dInf, dInf, 0, 70,
65, dInf, 100, dInf, 0
};
double* pdMinDist = new double[5*5];
int* path = new int[5*5];
GraAlg.MinDist_Floy(5, R1, pdMinDist, path);
PATH PathSE;
// PathSE.push_back(5);
GraAlg.GetPath(0, 2, 5, path, PathSE);
double R[36] = {dInf, 6, 1, 5, dInf, dInf,
6, dInf, 5, dInf, 3, dInf,
1, 5, dInf, 5, 6, 4,
5, dInf, 5, dInf, dInf, 2,
dInf, 3, 6, dInf, dInf, 6,
dInf, dInf, 4, 2, 6, dInf};
int* piMT = new int[6];
double dMinFee = 0;
GraAlg.MinSpanTree_Prim(6, R, piMT, dMinFee);
delete[] piMT;
delete[] pdMinDist;
delete[] path;
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -