-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataStructures.h
57 lines (42 loc) · 1.26 KB
/
DataStructures.h
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
//
// Created by Bychin on 06.10.2017.
//
#ifndef LABORATORY_WORK_1_2_DATASTRUCTURES_H
#define LABORATORY_WORK_1_2_DATASTRUCTURES_H
#include <iostream>
#include <vector>
struct Node {
int id;
double x, y ,z;
bool vertex;
Node() = default;
Node(int, double, double, double, bool);
bool operator==(const Node&) const;
bool operator<(const Node&) const;
friend std::ostream& operator<<(std::ostream&, const Node&);
friend std::ostream& operator<<(std::ostream&, const std::vector<Node>&);
};
struct Element {
int element_id;
int material_id;
std::vector<int> nodes_id;
friend std::ostream& operator<<(std::ostream&, const Element&);
friend std::ostream& operator<<(std::ostream&, const std::vector<Element>&);
};
struct Surface : public Element {
int surface_id;
int border_id;
friend std::ostream& operator<<(std::ostream&, const Surface&);
friend std::ostream& operator<<(std::ostream&, const std::vector<Surface>&);
};
struct Edge {
int first_node_id;
int last_node_id;
int center_id;
Edge() = default;
Edge(int, int, int);
bool operator==(const Edge&) const;
bool operator<(const Edge&) const;
void UpdateCenter(int);
};
#endif //LABORATORY_WORK_1_2_DATASTRUCTURES_H