From 3270d51b269cd98719dca3d04c03d76fdda3659a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=91=D0=BE=D0=B3=D0=B4=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2?= Date: Tue, 5 Oct 2021 13:38:06 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=BC=D0=B5=D1=87=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BF=D0=BE=20Structures.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Structures.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Structures.h b/Structures.h index 8483d86..53516c5 100644 --- a/Structures.h +++ b/Structures.h @@ -4,7 +4,11 @@ #include #include #include "iostream" + using namespace std; + +//!!! Между объявлениями должна быть 1-2 строки для лучшей читаемости + struct Node{ int id; double x, y, z; @@ -13,11 +17,18 @@ struct Node{ friend std::ostream &operator<<(std::ostream &, const vector &); friend std::ostream &operator<<(std::ostream &, const set &); friend std::ostream &operator<<(std::ostream &, const map &); + friend bool operator <(const Node &lhs, const Node &rhs) - { return lhs.id < rhs.id; }; + { + return lhs.id < rhs.id; + }; + friend bool operator >(const Node &lhs, const Node &rhs) - { return lhs.id > rhs.id; }; + { + return lhs.id > rhs.id; + }; }; + struct FiniteElement{ int fe_id; int mat_id; @@ -26,6 +37,7 @@ struct FiniteElement{ friend std::ostream &operator<<(std::ostream &, const FiniteElement &); friend std::ostream &operator<<(std::ostream &, const std::vector &); }; + struct BoundaryFiniteElement : public FiniteElement{ int bfe_id; int border_id; -- GitLab