图头文件C++

来源:互联网 发布:网络测速器手机版在线 编辑:程序博客网 时间:2024/09/21 09:17
 
//graphRepresentAsAdjacentList.h -- graph header file.//2011-08-28-20.26 -- //Purpose://Define a class "graphRepresentAsAdjacentList".//Declare methods of the class, and define element member.#include <iostream>#include <vector>#include "binaryHeap.h"using std ::vector ;class graphRepresentAsAdjacentList{public:typedef struct node{int indexInAdjacentList ;int weight ;struct node * next ;} Node ;private:int m_size ;int m_currentSize ;vector<Node> m_adjacentListVector ;Node * m_makeNode (int indexInAdjacentList, int weight) ;public:graphRepresentAsAdjacentList (int size = 0) ;~graphRepresentAsAdjacentList (void) ;bool importANode (const std ::vector<int> & indexVector, const std ::vector<int> & weightVector) ;bool printMinmunSpanningTreeUsingPrim (int startIndex) ;bool printGraph (void) ;} ;
原创粉丝点击