Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into task_01
Browse files Browse the repository at this point in the history
  • Loading branch information
dlinniy18 authored Dec 15, 2023
2 parents 4892f07 + b98826c commit cd3c5fc
Show file tree
Hide file tree
Showing 92 changed files with 8,119 additions and 15 deletions.
29 changes: 14 additions & 15 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,37 @@
|| ФИО | Directory name | #0 | #1 | #2 | #3 | #4 | #5 | #6 | #7 | Рейтинг |
|----|------------------------------------------------------|-------------------------|----|-----|----|----|----|----|----|----|---------|
| 1 | Бусень Артём |[ii02301](trunk/ii02301) |||||| | | | 6|
| 2 | [Волкогон Никита](https://github.com/VolkogonNikita) |[ii02302](trunk/ii02302) |||| ||| | | 8|
| 2 | [Волкогон Никита](https://github.com/VolkogonNikita) |[ii02302](trunk/II02302) |||| ||| | | 9|
| 3 | [Вышинский Артём](https://github.com/arciomwww) |[ii02303](trunk/ii02303) ||||| | | | | 6|
| 4 | [Гавришук Владислав](https://github.com/VLadGavrishuk)|[ii02304](trunk/ii02304)|||||| | | | 7|
| 4 | [Гавришук Владислав](https://github.com/VLadGavrishuk)|[ii02304](trunk/ii02304)|||||| | | | 7|
| 5 | Глухарев Даниил |[ii02305](trunk/ii02305) ||||| | | | | 7|
| 6 | Колеснев Антон |[ii02307](trunk/ii02307) |||||| | | | 7|
| 7 | Кононов Алексей |[ii02309](trunk/ii02309) ||||| | | | | 6|
| 8 | [Копач Александр](https://github.com/AtticaQQ) |[ii02308](trunk/ii02308) ||||| | | | | 6|
| 6 | [Колеснев Антон](https://github.com/Flugel228) |[ii02307](trunk/ii02307) |||||| | | | 7|
| 7 | [Кононов Алексей](https://github.com/madebyth00 |[ii02309](trunk/ii02309) ||||| | | | | 6|
| 8 | [Копач Александр](https://github.com/AtticaQQ) |[ii02308](trunk/ii02308) ||||| | | | | 6|
| 9 | Кунц Александр | ||||| | | | | |
| 10 | [Лапин Владимир](https://github.com/LapinVladimir) |[ii02310](trunk/ii02310) |||||| | | | 8|
| 11 | [Привезенцев Михаил](https://github.com/MishanyPrivezentsev)| ||||| | | | | |
| 12 | [Ежевский Егор](https://github.com/pinkgrasss) |[ii02312](trunk/ii02312) |||| || | | | 7|
| 12 | [Ежевский Егор](https://github.com/pinkgrasss) |[ii02312](trunk/ii02312) |||| || | | | 8|
| 13 | Макаревич Кирилл | ||||| | | | | |
| 14 | [Макаревич Никита](https://github.com/sosiska52) |[ii02314](trunk/ii02314) |||||| | | | 7|
| 15 | Маслакова Ксения | ||||| | | | | |
| 16 | [Медведь Павел](https://github.com/Dizzers) |[ii02316](trunk/ii02316) |||||| | | | 8|
| 17 | Новицкая Вероника |[ii02317](trunk/ii02317) ||||| | | | | 6|
| 18 | Осипова Алла | ||||| | | | | |
| 19 | Палто Елена |[ii02319](trunk/ii02319) ||| | | | | | | 6|
| 20 | [Романюк Алексей](https://github.com/Gomziakoff) |[ii02320](trunk/ii02320) |||| ||| | | 9|
| 21 | [Скварнюк Давид](https://github.com/Bidway) |[ii02321](trunk/ii02321) |||| ||| | | 8|
| 19 | [Палто Елена](https://github.com/AlenaSokol) |[ii02319](trunk/ii02319) ||| | | ||| |(научная работа) 10|
| 20 | [Романюк Алексей](https://github.com/Gomziakoff) |[ii02320](trunk/ii02320) |||| ||| | | 9|
| 21 | [Скварнюк Давид](https://github.com/Bidway) |[ii02321](trunk/ii02321) |||| ||| | | 9|
| 22 | [Тутина Елизавета](https://github.com/Eliza0756) |[ii02322](trunk/ii02322) ||||| | | | | 7|
| 23 | Швороб Владислав | ||||| | | | | 6|

## Группа ИИ-24
|| ФИО | Directory name | #0 | #1 | #2 | #3 | #4 | #5 | #6 | #7 | Рейтинг |
|----|----------------------------------------------------|------------------------------|----|----|-----|----|-----|----|----|----|---------|
| 1 | [Алешко Ангелина](https://github.com/Melivu) | [ii02401](trunk/ii02401) ||| ||| | | | 6|
| 1 | [Алешко Ангелина](https://github.com/Melivu) | [ii02401](trunk/ii02401) ||| ||| | | | 8|
| 2 | Баранчук Иван | [ii02402](trunk/ii02402) |||||| | | | 6|
| 3 | Бузель Сергей | [ii02403](trunk/ii02403) ||||| | | | | |
| 4 | Капуза Николай | [ii02404](trunk/ii02404) |||||| | | | 6|
| 5 | Коцуба Екатерина | [ii02405](trunk/ii02405) ||||| | | | | |
| 4 | [Капуза Николай](https://github.com/Pozitivchikkk3)| [ii02404](trunk/ii02404) |||||| | | | 6|
| 5 | [Коцуба Екатерина](https://github.com/Katty-Bisha) | [ii02405](trunk/ii02405) ||||| | | | | |
| 6 | [Крейдич Артем](https://github.com/TemaKreidic) | [ii02406](trunk/ii02406) |||||| | | | 8|
| 7 | [Крупич Даниил](https://github.com/Duferig) | [ii02407](trunk/ii02407) |||||| | | | 8|
| 8 | Кураш Александр | [ii02408](trunk/ii02408) |||||| | | | 9|
Expand All @@ -61,10 +61,9 @@
| 15 | [Рекун Дмитрий](https://github.com/DmitryRekun) | [ii02415](trunk/ii02415) |||||| | | | 6|
| 16 | [Рудецкий Евгений](https://github.com/RuuuuuD3) | [ii02416](trunk/ii02416) ||||| | | | | 7|
| 17 | Супрунович Илья | [ii02417](trunk/ii02417) ||||| | | | | |
| 18 | [Сухаревич Дмитрий](https://github.com/SukharevichDmitry)|[ii02418](trunk/ii02418)|||| || | | | 7|
| 18 | [Сухаревич Дмитрий](https://github.com/SukharevichDmitry)|[ii02418](trunk/ii02418)|||| || | | | 7|
| 19 | Терехов Николай | [ii02419](trunk/ii02419) |||||| | | | 6|
| 20 | Турубчук Екатерина | [ii02420](trunk/ii02420) ||||| | | | | |
| 21 | [Черник Владислав](https://github.com/fdlbro) | [ii02421](trunk/ii02421) ||||| | | | | 6|
| 22 | Штыхно Даниил | [ii02422](trunk/ii02422) |||||| | | | 7|
| 23 | Якимовец Евгений | [ii02423](trunk/ii02423) |||||| | | | 6|

| 23 | [Якимовец Евгений](https://github.com/EuZireael) | [ii02423](trunk/ii02423) |||||| | | | 6|
Binary file added trunk/II02302/task_03/doc/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/II02302/task_03/doc/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/II02302/task_03/doc/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/II02302/task_03/doc/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/II02302/task_03/doc/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/II02302/task_03/doc/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/II02302/task_03/doc/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added trunk/II02302/task_03/doc/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions trunk/II02302/task_03/doc/report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<p align="center">Министерство образования Республики Беларусь</p>
<p align="center">Учреждение образования</p>
<p align="center">«Брестский государственный технический университет»</p>
<p align="center">Кафедра ИИТ</p>
<br/><br/><br/><br/><br/>
<p align="center">Лабораторная работа №3</p>
<p align="center">За третий семестр</p>
<p align="center">По дисциплине: «Общая теория интеллектуальных систем»</p>
<p align="center">Тема: «Разработка редакторов графов»</p>
<br/><br/><br/><br/><br/>
<p align="right">Выполнила:</p>
<p align="right">Студентка 2 курса</p>
<p align="right">Группы ИИ-23</p>
<p align="right">Волкогон Н.И.</p>
<br/><br/>
<p align="right">Проверил:</p>
<p align="right">Иванюк Д.С.</p>

<p align="center">Брест 2023 <br/>

--
# В работе было реализованно: #
1. Разработка и реализация программного продукта позволяющего
редактировать графовые конструкции различных видов и производить над
ними различные действия.

2. Редактор позволяет:
a) одновременно работать с несколькими графами (MDI);
b) **[\*]** выделение одновременно нескольких элементов графа, копирование
выделенного фрагмента в clipboard и восстановление из него;
c) задавать имена графам;
d) сохранять и восстанавливать граф во внутреннем формате программы;
e) экспортировать и импортировать граф в текстовый формат (описание
см. ниже);
f) создавать, удалять, именовать, переименовывать, перемещать узлы;
g) создавать неориентированные дуги, удалять дуги;
h) добавлять, удалять и редактировать содержимое узла (содержимое в
виде текста и ссылки на файл);
i) задавать цвет дуги и узла, образ узла;
j) **[\*]** создавать и отображать петли;
k) **[\*]** создавать и отображать кратные дуги.

3. Программный продукт позволяет выполнять следующие операции:
a) выводить информацию о графе;
b) поиск всех путей (маршрутов) между двумя узлами и кратчайших;
c) вычисление расстояния между двумя узлами;
d) **[\*]** раскраска графа;
e) нахождения эйлеровых циклов.

4. Отчет по выполненной лабораторной работе в .md формате (readme.md). Разместить его в следующем каталоге: **trunk\ii0xxyy\task_03\doc** (где **xx** - номер группы, **yy** - номер студента, например **ii02302**).

5. Исходный код разработанной программы разместить в каталоге: **trunk\ii0xxyy\task_03\src**.
nk\ii0xxyy\task_04\doc.

![Снимок экрана (1)](1.png)
![Снимок экрана (2)](2.png)
![Снимок экрана (3)](3.png)
![Снимок экрана (4)](4.png)
![Снимок экрана (5)](5.png)
![Снимок экрана (6)](6.png)
![Снимок экрана (7)](7.png)
![Снимок экрана (8)](8.png)
14 changes: 14 additions & 0 deletions trunk/II02302/task_03/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.5)

project(otis_3)

set(SOURCES
Source.cpp
library.cpp
)

set(HEADERS
header.h
)

add_executable(OTIS_03 ${SOURCES} ${HEADERS})
172 changes: 172 additions & 0 deletions trunk/II02302/task_03/src/Source.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
#include <iostream>
#include <fstream>
#include <vector>
#include "..\Graph_lib\Header.h";

using namespace std;

int main()
{
string str;
cout << "Enter file's name: ";
cin >> str;
ifstream fin(str);
int vertexCount, edgesCount;
fin >> vertexCount >> edgesCount;

int** matrix = new int* [vertexCount];
for (int i = 0; i < vertexCount; i++)
matrix[i] = new int[vertexCount];
vector<bool> used(vertexCount);
int res;
int* path = new int[vertexCount];
int* f = new int[vertexCount];
//menu
int go;
do
{
cout << "1. Fill Matrix\n";
cout << "2. Paint Matrix\n";
cout << "\nlab1\n3. bfs\n";
cout << "4. dfs\n";
cout << "\nlab2\n5. Gamilton\n";
cout << "6. Euler\n";
cout << "\nlab3\n7. Dijkstra\n";
cout << "8. Floyd\n";
cout << "\nlab5\n9. Prim\n";
cout << "10.Kruskal\n";
cout << "\nlab4\n11. Kali\n";
cout << "12. Permutation\n";
cout << "\nlab6\n13. Strong connectivity\n";
cout << "14.Biconnected Components\n";
cout << "0. End\n";
cout << "Choise: ";
cin >> go;
switch (go)
{
case 1://Fill
system("cls");
Fill_Matrix(matrix, vertexCount, edgesCount, str);
break;

case 2://Paint
system("cls");
Paint_Matrix(matrix, vertexCount);
break;

case 3://bfs
system("cls");
res = 0;
for (int i = 0; i < vertexCount; i++)
if (!used[i])
{
res++;
bfs(matrix, vertexCount, i, used);
}
cout << endl << "Number of connectivity components: " << res << endl;
break;

case 4://dfs
system("cls");
res = 0;
for (int i = 0; i < vertexCount; i++)
if (!used[i])
{
res++;
dfs(matrix, vertexCount, i, used);
}
cout << endl << "Number of connectivity components: " << res << endl;
break;

case 5://Gamilton
system("cls");
int v0;
cout << "Enter firts vertex: ";
cin >> v0;
v0--;
for (int i = 0; i < vertexCount; i++)
f[i] = -1;
f[v0] = v0;
path[0] = v0;
if (Gamilton(matrix, path, f, vertexCount, 1, v0))
{
Print_Path(path, vertexCount);
cout << endl;
}
else cout << "No results\n";
break;

case 6://Euler
system("cls");

if ( res > 1)
cout << "Wrong\n";
else
{

int check = 0;
int buf;
for (int i = 0; i < vertexCount; i++)
{
buf = 0;
for (int j = 0; j < vertexCount; j++)
buf += matrix[i][j];
if (buf % 2)
check++;
}
if (check)
cout << "Wrong\n";
else
{

vector<int>path;
Euler(matrix, path, vertexCount);
for (int i = 1; i < path.size(); i++)
cout << path[i] + 1 << " ";
cout << endl;
break;
}
}

case 7:
system("cls");
Dijkstra(matrix,vertexCount);
break;

case 8:
system("cls");
Floyd(matrix, vertexCount);
break;

case 9:
system("cls");
Prim(matrix, vertexCount);
break;

case 10:
system("cls");
main_kruskal(matrix,vertexCount, edgesCount,str);
break;

case 11:
system("cls");
Kali();
break
;
case 12:
system("cls");
Permutation(str);
break;

case 13:
system("cls");
StrongConnectedComponents(matrix, vertexCount);
break;
case 14:
system("cls");
FindArtPointsAndBridges(matrix, vertexCount);
break;
}
} while (go);

}
21 changes: 21 additions & 0 deletions trunk/II02302/task_03/src/header.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using namespace std;
#pragma once
void dfs(int**, int, int, vector<bool>&);
void bfs(int**, int, int, vector<bool>&);
void Fill_Matrix(int**&, int, int, string);
void Paint_Matrix(int**&, int);
bool Gamilton(int**&, int*&, int*&, int, int, int);
void Print_Path(int*&, int);
void Euler(int**&, vector<int>&, int);
void Dijkstra(int**&, int);
void Floyd(int**&, int);
void Prim(int**&, int);
int parent(int*, int);
void union_find(int*, int, int);
void Kruskal(pair<int, pair <int, int>>*, int*, int**&, int, int);
void main_kruskal(int**&, int, int, string);
void Kali();
void Permutation(string);
void StrongConnectedComponents(int**&, int);
//void findBiconnectedComponents(int**&, int);
void FindArtPointsAndBridges(int**&, int);
Loading

0 comments on commit cd3c5fc

Please sign in to comment.