1 Star 2 Fork 0

章宏亮/SubwayTicketingSystem

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Edge.h 710 Bytes
一键复制 编辑 原始数据 按行查看 历史
章宏亮 提交于 2024-05-07 00:25 +08:00 . 清空仓库后首次提交
#pragma once
//Edge类
class Edge {
public:
int line;
int weight; //weight是边的权
int from; //from是边的始点
int to; //to是边的终点
Edge() { // 构造函数
from = -1; to = -1; weight = 0; line = 0;
}
Edge(int l, int f, int t, int w) { // 构造函数
from = f; to = t; weight = w; line = l;
}
bool operator < (const Edge& arg) { return (this->weight < arg.weight); };
bool operator == (const Edge& arg) { return (this->weight == arg.weight); };
bool operator > (const Edge& arg) { return (this->weight > arg.weight); };
bool operator <= (const Edge& arg) { return (this->weight <= arg.weight); };
bool operator >= (const Edge& arg) { return (this->weight >= arg.weight); };
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/startfromC/subway-ticketing-system.git
git@gitee.com:startfromC/subway-ticketing-system.git
startfromC
subway-ticketing-system
SubwayTicketingSystem
master

搜索帮助