forked from mcf171/SocialNetWork
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.hpp
More file actions
65 lines (50 loc) · 1.19 KB
/
Copy pathNode.hpp
File metadata and controls
65 lines (50 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//
// Node.h
// SocialNetWork
//
// Created by 王珏 on 15/12/21.
// Copyright © 2015年 王珏. All rights reserved.
//
#ifndef Node_h
#define Node_h
#include <vector>
#include <iostream>
#include "ConstantFile.h"
using namespace std;
class Edge;
class Tree;
class Node{
public:
vector<Edge*> neighbourEdge;
vector<Edge*> dijkstraEdge;
Tree* MIA;
~Node();
status currentStatus;
//Node的影响力
double weight;
double influence;
//Node在图中的序号
int number;
bool operator < (const Node &target) const{
return this->influence < target.influence;
}
bool operator == (const Node& target)
{
return this->number == target.number;
}
bool operator == (Node* target)
{
return this->number == target->number;
}
bool operator != (const Node& target)
{
return this->number != target.number;
}
bool operator < ( Node* target) const
{
return this->influence < target->influence;
}
};
bool findNode(vector<Node> nodes, Node node);
vector<Node>::const_iterator findNodeIter(vector<Node> nodes, Node node);
#endif /* Node_h */