unweightededge.h
来自「datastucutre and algorithms, application」· C头文件 代码 · 共 25 行
H
25 行
// edge in an unweighted graph
#ifndef unweightedEdge_
#define unweightedEdge_
#include "edge.h"
#include "myExceptions.h"
using namespace std;
class unweightedEdge : public edge<bool>
{
public:
unweightedEdge(int theV1, int theV2)
{v1 = theV1; v2 = theV2;}
~unweightedEdge() {};
int vertex1() const {return v1;}
int vertex2() const {return v2;}
bool weight() const {throw undefinedMethod("weight");}
private:
int v1,
v2;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?