-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpointgraph.h
More file actions
39 lines (30 loc) · 1.25 KB
/
Copy pathpointgraph.h
File metadata and controls
39 lines (30 loc) · 1.25 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 POINTGRAPH_H
#define POINTGRAPH_H
#include <vector>
#include <utility>
#include "fractions.h"
//Данный класс отвечает за точку, у каждой точки есть:
//2 соседние точки, либо 1 точка и NULL, а так же 2 уравнения, на пересечении которых стоит точка
//Точки можно сравнивать на принадлежность уравнению
class PointGraph
{
public:
PointGraph();
PointGraph(Fractions x, Fractions y, vector<Fractions> equation1, vector<Fractions> equation2);
Fractions getX() const;
Fractions getY() const;
PointGraph *getFirst_neighbour() const;
void setFirst_neighbour(PointGraph *newFirst_neighbour);
PointGraph *getSecond_neigbour() const;
void setSecond_neigbour(PointGraph *newSecond_neigbour);
const vector<Fractions> &getFirst_equation() const;
const vector<Fractions> &getSecond_equation() const;
bool operator < (const PointGraph& pg) const;
private:
pair<Fractions, Fractions> point;
PointGraph* first_neighbour = NULL;
PointGraph* second_neigbour = NULL;
vector<Fractions> first_equation;
vector<Fractions> second_equation;
};
#endif // POINTGRAPH_H