-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphOperator.h
More file actions
39 lines (31 loc) · 1.15 KB
/
graphOperator.h
File metadata and controls
39 lines (31 loc) · 1.15 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
#ifndef GRAPHOPERATOR_H
#define GRAPHOPERATOR_H
#include "graphGenerator.h"
//pass graph by reference
//pass component as parameter instead?
class GraphOperator{
public:
Graph g;
GraphOperator(Graph gr);
//Find the average degree
double FindAverageDegree();
//Find the vertex with the highest degree
std::vector<int> FindHighestDegree();
//Find the number of connected components
int FindConnectedNumber();
//Find the diameter, radius, and centers of each component.
void FindConnectedParameter();
//Find the ratio between the number of open and closed triangles
double FindTrianglesRatio();
//Find the closest node from x with an interest level of
//at least t on hobby h.
int FindClosestNode(int x, double t, int h);
//Find a person with the highest interest in h.
int FindHighestInterest(int h);
//Find a pair of nodes x and y whose ratio between hobby
//distance and graph distance is smallest.
void FindDistanceRatio();
//helpers
double hobbyDistance(int x, int y);
};
#endif