📄 shortest.h
字号:
#ifndef SHORTEST_H
#define SHORTEST_H
#include <vector>
#include <map>
#include <set>
#include <queue>
#include "Client.h"
using namespace std;
#define END_SHORTEST_ITERATOR -1
static const int START = 0;
static const int NONE = 1;
static const int BUYER = 2;
static const int SELLER = 3;
class ShortestEntry {
public:
string email;//
//the bids set to contain the email addresses whose auctions
//this user has bid on
set<string> bids;
//the offerings set to contain the email addresses of the users
//who have placed the highest bids for each of this user's auctions.
set<string> offerings;
string via;
int hop_count;
int relationship;
};
class Shortest {
private:
map<string, ShortestEntry> table;
queue<ShortestEntry> recently_known;
public:
//void displayMap(string file_name);
Shortest (const string &start_email);
vector<string> get_path(const string &destination_email);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -