一、数据集形式
其中:6105(节点个数) 7035(边数)
0(id) 1609(起始边) 1622(终边) 57.403187(权重)
二、数据集
三、实现代码
// Kruskal.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "time.h"
#include <fstream>
#include<iostream>
#include <stack>
using namespace std;
static int nodeNumber; //图顶点的个数
static int edgeNumber; //图边的个数
#define PATH "E://dataset//MapSet//MinCreateTree//test.txt"
class CGrapNode
{
public:
CGrapNode()
{}
~CGrapNode() {}
int value;
double weigth;
CGrapNode *next;
};
class CWeightSort {
public:
int begin;
int end;
double