shortest.h

来自「exam3 ssd5的」· C头文件 代码 · 共 47 行

H
47
字号
#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 + =
减小字号Ctrl + -
显示快捷键?