-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshared.h
More file actions
30 lines (22 loc) · 691 Bytes
/
Copy pathshared.h
File metadata and controls
30 lines (22 loc) · 691 Bytes
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
#pragma once
#include <vector>
#include <cstddef>
#include <random>
/* better randomization */
int getRand(int x);
double getRand01();
const int INF = 1e9 + 1337;
class graph {
public:
std::vector<std::pair<int, int>> edges;
std::vector<std::pair<double, double>> positions;
size_t size;
graph();
graph(size_t, const std::vector<std::pair<int, int>>&, const std::vector<std::pair<double, double>>&);
graph(const graph&);
void setEdges(const std::vector<std::pair<int, int>>&);
void setPositions(const std::vector<std::pair<double, double>>&);
void setRandomPositions();
void scaleToUnitSquare();
std::vector<char> getNeighbours(int v);
};