📄 algraph.h
字号:
// ALGraph.h: interface for the ALGraph class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_ALGRAPH_H__92806C51_DA6C_11D4_8238_4C542D32048F__INCLUDED_)
#define AFX_ALGRAPH_H__92806C51_DA6C_11D4_8238_4C542D32048F__INCLUDED_
#include "Info.h" // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ArrayElem.h"
#include "afxtempl.h"
#include "afx.h"
#include "InfoNode.h" // Added by ClassView
class ALGraph
{
public:
int m_vexnum;
int m_arcnum;
CArray<ArrayElem,ArrayElem &> m_vertices;
public:
BOOL SeekShort(CString,CString,CString &,int kind=1);
int m_nowtime;
void Serialize(CArchive& archive);
ALGraph(const ALGraph &);
ALGraph & operator =(ALGraph &);
Info CreatInfo(int fee,int time,int timespend);
InfoNode CreatInofNode(Info car,Info plain,Info train,int distance=-1,int=-1);
bool EditArc(CString,CString,InfoNode);
bool DeleteCity(CString,CString);
bool DeleteCity(CString);
bool CityLocal(CString,int &);
bool InsertCity(CString,CString,InfoNode); //插入名字和第一个参数
//相同,且信息在第二个参数中;当CString不存在或info中的
//城市代号没有时返回假
bool CityLocal(CString cityname); //查找和cityname相等的接点
bool InsertCity(CString); //插入一个不存在的城市,假如存在返回false
ALGraph();
virtual ~ALGraph();
private:
void MakeString(const int kind,CString & temp);
int m_tatol;
int * GetVector();
int * isformed;
int ID;
protected:
bool ShortestPath(const int v,const int e,CList<int,int &> &,int kind=1);
void GetMGraph(int kind);
int MatrixToInt(int, int);
};
#endif // !defined(AFX_ALGRAPH_H__92806C51_DA6C_11D4_8238_4C542D32048F__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -