//贪心算法
//最小生成树的kruskal的算法
#include "stdafx.h"
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
//int maxint=mar_maxint;
class BinaryTree;
class EdgeNode//边的数据结构
{
private:
int u,v;//边所在的顶点
double weight;//边的权值
friend ostream&operator<<(ostream&os,const EdgeNode&E);
friend void Kruskal(vector<EdgeNode>&E,vector<BinaryTree>&B,vector<EdgeNode>&N);
//friend bool maxless(const EdgeNode&E1,const EdgeNode&E2);
public:
EdgeNode(int u1=0,int v1=0,double weight1=0):u(u1),v(v1),weight(weight1){}
bool operator<(const EdgeNode&E)const
{
return weight>E.weight;
}
};