forked from UNN/2026-rff_mp
Merge pull request '[1,2]stepinim' (#370) from stepinim/2026-rff_mp:stepinim into develop
Reviewed-on: UNN/2026-rff_mp#370
This commit is contained in:
commit
d238e70691
5
.idea/.gitignore
vendored
Normal file
5
.idea/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Игнорируемые файлы по умолчанию
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# HTTP-клиент на основе редактора
|
||||
/httpRequests/
|
||||
8
.idea/2026-rff_mp.iml
Normal file
8
.idea/2026-rff_mp.iml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.14" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
7
.idea/misc.xml
Normal file
7
.idea/misc.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.14" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.14" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/2026-rff_mp.iml" filepath="$PROJECT_DIR$/.idea/2026-rff_mp.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
BIN
stepinim/lab1_structure/docs/data/lab1_graph.png
Normal file
BIN
stepinim/lab1_structure/docs/data/lab1_graph.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
55
stepinim/lab1_structure/docs/data/lab1_results.csv
Normal file
55
stepinim/lab1_structure/docs/data/lab1_results.csv
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
Структура,Режим,Повтор,Операция,Время (сек)
|
||||
LinkedList,shuffled,1,insert,0.5023735999711789
|
||||
LinkedList,shuffled,1,search,0.022223800013307482
|
||||
LinkedList,shuffled,1,delete,0.010106799949426204
|
||||
LinkedList,shuffled,2,insert,0.5151404999778606
|
||||
LinkedList,shuffled,2,search,0.023844500014092773
|
||||
LinkedList,shuffled,2,delete,0.010028599994257092
|
||||
LinkedList,shuffled,3,insert,0.5328615000471473
|
||||
LinkedList,shuffled,3,search,0.020557800016831607
|
||||
LinkedList,shuffled,3,delete,0.012162799946963787
|
||||
LinkedList,sorted,1,insert,0.4577932999818586
|
||||
LinkedList,sorted,1,search,0.017212599981576204
|
||||
LinkedList,sorted,1,delete,0.012185800005681813
|
||||
LinkedList,sorted,2,insert,0.43183969997335225
|
||||
LinkedList,sorted,2,search,0.01829650002764538
|
||||
LinkedList,sorted,2,delete,0.012130599992815405
|
||||
LinkedList,sorted,3,insert,0.436789300001692
|
||||
LinkedList,sorted,3,search,0.017460400005802512
|
||||
LinkedList,sorted,3,delete,0.012465099978726357
|
||||
HashTable,shuffled,1,insert,0.0032562999986112118
|
||||
HashTable,shuffled,1,search,9.469996439293027e-05
|
||||
HashTable,shuffled,1,delete,5.15999854542315e-05
|
||||
HashTable,shuffled,2,insert,0.0031429000082425773
|
||||
HashTable,shuffled,2,search,9.000004502013326e-05
|
||||
HashTable,shuffled,2,delete,4.360004095360637e-05
|
||||
HashTable,shuffled,3,insert,0.003212600015103817
|
||||
HashTable,shuffled,3,search,0.00010830000974237919
|
||||
HashTable,shuffled,3,delete,4.650000482797623e-05
|
||||
HashTable,sorted,1,insert,0.0030796999926678836
|
||||
HashTable,sorted,1,search,8.420000085607171e-05
|
||||
HashTable,sorted,1,delete,4.730001091957092e-05
|
||||
HashTable,sorted,2,insert,0.0030180999892763793
|
||||
HashTable,sorted,2,search,9.079999290406704e-05
|
||||
HashTable,sorted,2,delete,5.299999611452222e-05
|
||||
HashTable,sorted,3,insert,0.0029779999749734998
|
||||
HashTable,sorted,3,search,8.510000770911574e-05
|
||||
HashTable,sorted,3,delete,6.589997792616487e-05
|
||||
BST,shuffled,1,insert,0.011618499993346632
|
||||
BST,shuffled,1,search,0.00031289999606087804
|
||||
BST,shuffled,1,delete,0.0002456999500282109
|
||||
BST,shuffled,2,insert,0.021565500006545335
|
||||
BST,shuffled,2,search,0.00032350001856684685
|
||||
BST,shuffled,2,delete,0.0002101999707520008
|
||||
BST,shuffled,3,insert,0.011865400010719895
|
||||
BST,shuffled,3,search,0.0003497999859973788
|
||||
BST,shuffled,3,delete,0.0002114999806508422
|
||||
BST,sorted,1,insert,1.961912199971266
|
||||
BST,sorted,1,search,0.025325599999632686
|
||||
BST,sorted,1,delete,0.03309909999370575
|
||||
BST,sorted,2,insert,1.8450072000268847
|
||||
BST,sorted,2,search,0.025074300006963313
|
||||
BST,sorted,2,delete,0.03284020000137389
|
||||
BST,sorted,3,insert,1.8502263000118546
|
||||
BST,sorted,3,search,0.028948499995749444
|
||||
BST,sorted,3,delete,0.040639499959070235
|
||||
|
15
stepinim/lab1_structure/docs/otchet_1lab.md
Normal file
15
stepinim/lab1_structure/docs/otchet_1lab.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
В ходе экспериментов было показано, что производительность структуры данных сильно зависит
|
||||
от её внутреннего устройства и характера входных данных.
|
||||
|
||||
BST работает быстро на случайных данных, но при отсортированном порядке деградирует почти до
|
||||
связного списка, из-за чего время вставки и удаления резко увеличивается. Хеш-таблица
|
||||
практически не зависит от порядка входных данных, так как доступ к элементам происходит через
|
||||
хеш-функцию, поэтому она показала лучшие результаты при поиске и вставке. Связный список
|
||||
оказался самым медленным при поиске, так как требует последовательного обхода элементов.
|
||||
|
||||
Удаление также работает по-разному: в связном списке и BST сначала требуется поиск элемента,
|
||||
а в хеш-таблице удаление обычно выполняется быстрее за счёт обращения к нужному бакету.
|
||||
|
||||
На практике хеш-таблицы лучше подходят для частого поиска и вставки данных, BST — когда
|
||||
важно хранить элементы в отсортированном виде, а связные списки полезны в более простых
|
||||
задачах, где структура данных часто изменяется и не требуется быстрый поиск.
|
||||
376
stepinim/lab1_structure/test.py
Normal file
376
stepinim/lab1_structure/test.py
Normal file
|
|
@ -0,0 +1,376 @@
|
|||
import sys
|
||||
|
||||
sys.setrecursionlimit(30000) # Увеличиваю лимит рекурсии для BST
|
||||
|
||||
# Связный список
|
||||
def ll_insert(head, name, phone):
|
||||
new_node = {'name': name, 'phone': phone, 'next': None} # Создаю новый узел
|
||||
if head is None: # Если список пуст
|
||||
return new_node # Возвращаю узел как голову
|
||||
|
||||
curr = head # Указатель для обхода
|
||||
prev = None # Храню предыдущий узел
|
||||
while curr is not None: # Иду по списку
|
||||
if curr['name'] == name: # Если нашел такое же имя
|
||||
curr['phone'] = phone # Обновляю телефон
|
||||
return head
|
||||
prev = curr
|
||||
curr = curr['next']
|
||||
prev['next'] = new_node # Добавляю в конец
|
||||
return head
|
||||
|
||||
|
||||
def ll_find(head, name):
|
||||
curr = head # Начинаю с головы
|
||||
while curr: # Иду по всему списку
|
||||
if curr['name'] == name: # Сравниваю имена
|
||||
return curr['phone'] # Возвращаю телефон
|
||||
curr = curr['next'] # Перехожу к следующему
|
||||
return None # Не нашел
|
||||
|
||||
|
||||
def ll_delete(head, name):
|
||||
if head is None: # Пустой список
|
||||
return None
|
||||
if head['name'] == name: # Удаляю голову
|
||||
return head['next'] # Возвращаю второй элемент
|
||||
curr = head
|
||||
while curr['next']: # Иду пока есть следующий
|
||||
if curr['next']['name'] == name: # Нашел элемент для удаления
|
||||
curr['next'] = curr['next']['next'] # Перепрыгиваю через него
|
||||
return head
|
||||
curr = curr['next']
|
||||
return head
|
||||
|
||||
|
||||
def ll_list_all(head):
|
||||
result = []
|
||||
curr = head
|
||||
while curr: # Собираю все элементы
|
||||
result.append((curr['name'], curr['phone']))
|
||||
curr = curr['next']
|
||||
result.sort(key=lambda x: x[0]) # Сортирую по имени
|
||||
return result
|
||||
|
||||
|
||||
# Хэш-таблица
|
||||
HASH_SIZE = 1009 # Размер таблицы - простое число
|
||||
|
||||
|
||||
def _hash_name(name):
|
||||
return hash(name) % HASH_SIZE # Беру остаток от деления - это индекс корзины
|
||||
|
||||
|
||||
def ht_insert(buckets, name, phone):
|
||||
idx = _hash_name(name) # Вычисляю индекс корзины
|
||||
buckets[idx] = ll_insert(buckets[idx], name, phone) # Метод цепочек - вставляю в список
|
||||
|
||||
|
||||
def ht_find(buckets, name):
|
||||
idx = _hash_name(name) # Нахожу корзину
|
||||
return ll_find(buckets[idx], name) # Ищу в цепочке
|
||||
|
||||
|
||||
def ht_delete(buckets, name):
|
||||
idx = _hash_name(name) # Нахожу корзину
|
||||
buckets[idx] = ll_delete(buckets[idx], name) # Удаляю из цепочки
|
||||
|
||||
|
||||
def ht_list_all(buckets):
|
||||
all_entries = []
|
||||
for bucket in buckets: # Прохожу по всем корзинам
|
||||
if bucket is not None:
|
||||
curr = bucket
|
||||
while curr: # Собираю всю цепочку
|
||||
all_entries.append((curr['name'], curr['phone']))
|
||||
curr = curr['next']
|
||||
all_entries.sort(key=lambda x: x[0])
|
||||
return all_entries
|
||||
|
||||
|
||||
# Двоичное дерево поиска
|
||||
def bst_insert(root, name, phone):
|
||||
if root is None: # Пустое место - создаю узел
|
||||
return {'name': name, 'phone': phone, 'left': None, 'right': None}
|
||||
if name < root['name']: # Меньше - иду влево
|
||||
root['left'] = bst_insert(root['left'], name, phone) # Рекурсивно вставляю в левое поддерево
|
||||
elif name > root['name']: # Больше - иду вправо
|
||||
root['right'] = bst_insert(root['right'], name, phone) # Рекурсивно вставляю в правое поддерево
|
||||
else: # Равно - обновляю
|
||||
root['phone'] = phone
|
||||
return root
|
||||
|
||||
|
||||
def bst_find(root, name):
|
||||
curr = root
|
||||
while curr: # Итеративный спуск по дереву
|
||||
if name == curr['name']: # Нашел
|
||||
return curr['phone']
|
||||
elif name < curr['name']: # Искомое меньше - налево
|
||||
curr = curr['left']
|
||||
else: # Искомое больше - направо
|
||||
curr = curr['right']
|
||||
return None
|
||||
|
||||
|
||||
def bst_delete(root, name):
|
||||
if root is None:
|
||||
return None
|
||||
if name < root['name']: # Ищу в левом поддереве
|
||||
root['left'] = bst_delete(root['left'], name)
|
||||
elif name > root['name']: # Ищу в правом поддереве
|
||||
root['right'] = bst_delete(root['right'], name)
|
||||
else: # Нашел узел для удаления
|
||||
if root['left'] is None: # Нет левого ребенка
|
||||
return root['right'] # Заменяю правым
|
||||
if root['right'] is None: # Нет правого ребенка
|
||||
return root['left'] # Заменяю левым
|
||||
# Есть оба ребенка - ищу минимальный в правом поддереве
|
||||
min_node = root['right']
|
||||
while min_node['left']: # Иду до самого левого
|
||||
min_node = min_node['left']
|
||||
root['name'] = min_node['name'] # Копирую данные преемника
|
||||
root['phone'] = min_node['phone']
|
||||
root['right'] = bst_delete(root['right'], min_node['name']) # Удаляю преемника
|
||||
return root
|
||||
|
||||
|
||||
def bst_list_all(root):
|
||||
result = []
|
||||
|
||||
def inorder(node): # Симметричный обход
|
||||
if node:
|
||||
inorder(node['left']) # Сначала левое
|
||||
result.append((node['name'], node['phone'])) # Потом корень
|
||||
inorder(node['right']) # Потом правое
|
||||
|
||||
inorder(root)
|
||||
return result
|
||||
|
||||
|
||||
# ============================================================
|
||||
# TECT
|
||||
# ============================================================
|
||||
|
||||
import os
|
||||
import random
|
||||
import time
|
||||
import csv
|
||||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
# ============================================================
|
||||
# ПОДГОТОВКА ПАПОК
|
||||
# ============================================================
|
||||
|
||||
DATA_DIR = os.path.join("docs", "data")
|
||||
os.makedirs(DATA_DIR, exist_ok=True)
|
||||
|
||||
csv_path = os.path.join(DATA_DIR, "lab1_results.csv")
|
||||
graph_path = os.path.join(DATA_DIR, "lab1_graph.png")
|
||||
|
||||
# ============================================================
|
||||
# ТЕСТОВЫЕ ДАННЫЕ
|
||||
# ============================================================
|
||||
|
||||
random.seed(42) # Фиксирую seed для повторяемости
|
||||
|
||||
N = 3000 # 3000 записей
|
||||
|
||||
base_records = [
|
||||
(f"User_{i:05d}", f"123-{i:05d}")
|
||||
for i in range(N)
|
||||
]
|
||||
|
||||
records_shuffled = base_records.copy()
|
||||
random.shuffle(records_shuffled) # Перемешанный порядок
|
||||
|
||||
records_sorted = sorted(base_records, key=lambda x: x[0]) # Отсортированный порядок
|
||||
|
||||
# Данные для поиска
|
||||
search_existing = [
|
||||
name for name, _ in random.sample(base_records, 100) # 100 существующих имен
|
||||
]
|
||||
|
||||
search_nonexist = [
|
||||
f"None_{i}"
|
||||
for i in range(10) # 10 несуществующих имен
|
||||
]
|
||||
|
||||
# Данные для удаления
|
||||
delete_names = [
|
||||
name for name, _ in random.sample(base_records, 50) # 50 имен для удаления
|
||||
]
|
||||
|
||||
|
||||
# ============================================================
|
||||
# СОЗДАНИЕ СТРУКТУР
|
||||
# ============================================================
|
||||
|
||||
def build_structure(records, struct_type):
|
||||
if struct_type == "ll":
|
||||
structure = None
|
||||
for name, phone in records:
|
||||
structure = ll_insert(structure, name, phone) # Последовательная вставка
|
||||
return structure
|
||||
|
||||
elif struct_type == "ht":
|
||||
structure = [None] * HASH_SIZE
|
||||
for name, phone in records:
|
||||
ht_insert(structure, name, phone) # Вставка с хэшированием
|
||||
return structure
|
||||
|
||||
elif struct_type == "bst":
|
||||
structure = None
|
||||
for name, phone in records:
|
||||
structure = bst_insert(structure, name, phone) # Вставка с ветвлением
|
||||
return structure
|
||||
|
||||
|
||||
# ============================================================
|
||||
# INSERT
|
||||
# ============================================================
|
||||
|
||||
def measure_insert(records, struct_type):
|
||||
start = time.perf_counter()
|
||||
build_structure(records, struct_type) # Замеряю время построения структуры
|
||||
end = time.perf_counter()
|
||||
return end - start
|
||||
|
||||
|
||||
# ============================================================
|
||||
# SEARCH
|
||||
# ============================================================
|
||||
|
||||
def measure_search(records, struct_type):
|
||||
structure = build_structure(records, struct_type) # Строю структуру
|
||||
start = time.perf_counter()
|
||||
|
||||
if struct_type == "ll":
|
||||
for name in search_existing + search_nonexist:
|
||||
ll_find(structure, name) # Поиск перебором
|
||||
elif struct_type == "ht":
|
||||
for name in search_existing + search_nonexist:
|
||||
ht_find(structure, name) # Поиск через хэш
|
||||
elif struct_type == "bst":
|
||||
for name in search_existing + search_nonexist:
|
||||
bst_find(structure, name) # Поиск спуском по дереву
|
||||
|
||||
end = time.perf_counter()
|
||||
return end - start
|
||||
|
||||
|
||||
# ============================================================
|
||||
# DELETE
|
||||
# ============================================================
|
||||
|
||||
def measure_delete(records, struct_type):
|
||||
structure = build_structure(records, struct_type) # Строю структуру
|
||||
start = time.perf_counter()
|
||||
|
||||
if struct_type == "ll":
|
||||
for name in delete_names:
|
||||
structure = ll_delete(structure, name) # Удаление со сдвигом
|
||||
elif struct_type == "ht":
|
||||
for name in delete_names:
|
||||
ht_delete(structure, name) # Удаление из цепочки
|
||||
elif struct_type == "bst":
|
||||
for name in delete_names:
|
||||
structure = bst_delete(structure, name) # Удаление с ребалансировкой
|
||||
|
||||
end = time.perf_counter()
|
||||
return end - start
|
||||
|
||||
|
||||
# ============================================================
|
||||
# ЗАМЕРЫ
|
||||
# ============================================================
|
||||
|
||||
all_data = []
|
||||
|
||||
experiments = [
|
||||
("LinkedList", "ll"),
|
||||
("HashTable", "ht"),
|
||||
("BST", "bst")
|
||||
]
|
||||
|
||||
modes = [
|
||||
("shuffled", records_shuffled), # Тест на случайных данных
|
||||
("sorted", records_sorted) # Тест на отсортированных данных
|
||||
]
|
||||
|
||||
for struct_name, struct_type in experiments:
|
||||
for mode_name, records in modes:
|
||||
for rep in range(1, 4): # 3 повтора для усреднения
|
||||
insert_time = measure_insert(records, struct_type)
|
||||
search_time = measure_search(records, struct_type)
|
||||
delete_time = measure_delete(records, struct_type)
|
||||
|
||||
all_data.append([struct_name, mode_name, rep, "insert", insert_time])
|
||||
all_data.append([struct_name, mode_name, rep, "search", search_time])
|
||||
all_data.append([struct_name, mode_name, rep, "delete", delete_time])
|
||||
|
||||
# ============================================================
|
||||
# CSV
|
||||
# ============================================================
|
||||
|
||||
with open(csv_path, "w", newline="", encoding="utf-8") as f:
|
||||
writer = csv.writer(f)
|
||||
writer.writerow(["Структура", "Режим", "Повтор", "Операция", "Время (сек)"])
|
||||
writer.writerows(all_data)
|
||||
|
||||
print(f"CSV сохранён: {csv_path}")
|
||||
|
||||
# ============================================================
|
||||
# ГРАФИК
|
||||
# ============================================================
|
||||
|
||||
df = pd.read_csv(csv_path)
|
||||
|
||||
df_avg = (
|
||||
df.groupby(["Структура", "Режим", "Операция"])["Время (сек)"]
|
||||
.mean()
|
||||
.reset_index()
|
||||
)
|
||||
|
||||
fig, ax = plt.subplots(figsize=(12, 6))
|
||||
|
||||
ops = ["insert", "search", "delete"]
|
||||
x = range(len(ops))
|
||||
width = 0.12
|
||||
|
||||
configs = [
|
||||
("LinkedList", "shuffled"),
|
||||
("LinkedList", "sorted"),
|
||||
("HashTable", "shuffled"),
|
||||
("HashTable", "sorted"),
|
||||
("BST", "shuffled"),
|
||||
("BST", "sorted")
|
||||
]
|
||||
|
||||
for i, (struct, mode) in enumerate(configs):
|
||||
subset = df_avg[
|
||||
(df_avg["Структура"] == struct) &
|
||||
(df_avg["Режим"] == mode)
|
||||
]
|
||||
times = [
|
||||
subset[subset["Операция"] == op]["Время (сек)"].values[0]
|
||||
for op in ops
|
||||
]
|
||||
ax.bar(
|
||||
[p + i * width for p in x],
|
||||
times,
|
||||
width,
|
||||
label=f"{struct} ({mode})"
|
||||
)
|
||||
|
||||
ax.set_xticks([p + 2.5 * width for p in x])
|
||||
ax.set_xticklabels(ops)
|
||||
ax.set_ylabel("Среднее время (сек)")
|
||||
ax.set_title("Сравнение структур данных")
|
||||
ax.legend(bbox_to_anchor=(1.05, 1), loc="upper left")
|
||||
|
||||
plt.tight_layout()
|
||||
plt.savefig(graph_path)
|
||||
print(f"График сохранён: {graph_path}")
|
||||
plt.show()
|
||||
BIN
stepinim/lab2_oop/docs/data/chart_time_2lab.png
Normal file
BIN
stepinim/lab2_oop/docs/data/chart_time_2lab.png
Normal file
Binary file not shown.
20
stepinim/lab2_oop/docs/data/empty_2lab.txt
Normal file
20
stepinim/lab2_oop/docs/data/empty_2lab.txt
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
S
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
E
|
||||
100
stepinim/lab2_oop/docs/data/large_2lab.txt
Normal file
100
stepinim/lab2_oop/docs/data/large_2lab.txt
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
####################################################################################################
|
||||
#S # # ### ## ## # # ### # # ## # # ### ## #### # ## ## # #####
|
||||
# # # # ## ## # # # # # # # # # ##### # ## # # ## # ## # #
|
||||
## # ## ### ## #### ## # # # ## #### # ## #### ## ### # # # ## # # ## #
|
||||
### # ## ## ### # # #### # # # # ## ## ###### ## ## # # ### # ###
|
||||
## # # # ### # # ## ### ### # # ## # # # ## # # ####### # #
|
||||
###### ### ## # # # # # # ### ### ## ### ### ##### # # ## # # ## ## ####
|
||||
#### # ## # # ## # ## ## ## # ## # # ## ## # # # # ## ###
|
||||
# # # # # ###### # # ## #### # # # ## # # ### ##### ## # #
|
||||
# ### # # # # ## ### # # ## #### # # # ###### # # ###### # ## #
|
||||
## ## ## ### # # ### # # ## # ## ### ### ## ## # ### # # #
|
||||
## # ## # # ## # ### # ## # ### ## # ### ### ### # ## ## # ### # # #
|
||||
# # # # # ### # ## # # # ## # # # # # # # # # # ### ## # # ## # # #
|
||||
## # # # #### ## # # # # # # ### # # ##### # # # # # # # # #
|
||||
# ## ## # ## # # #### # # ## #### # ## # # # # # # # # #
|
||||
# # ### # # # ## # # # # ## ## # # # # ## # # # # ## ## #### # ## # # #
|
||||
# # ### # # ## # ## #### #### ## # #### # ### ## # # # # ## ## #
|
||||
##### # # # # # ## # ## # ### # # # # # # # # # # ### ## # ## ## #### # # #
|
||||
# # # #### ## ## ## # # # # # # # # # ## # # ## # ### # # ## # # # ##
|
||||
### # ### ####### ### # # # # # ## ## # ## # ## # ## ###
|
||||
# # ### ######## ### ## # # # # # # ## ## # ## ### # # # ### ### ###
|
||||
# # ## ## # # ### ### ## # # ## # # # # # ## ## ### # # #### #### ###
|
||||
# ### ## ### #### # ## # # ## # ## # ## ### # # # # ### # ## ###
|
||||
#### ## # ### # # ## ### ## # # # # # # # ## # ## ## # # # # ## ## #
|
||||
### ## # # #### ## ## ##### ## # # # ## # ## # # # # # # # # ## # ## # #
|
||||
# # # # # # # ## ## # ### # ## ## # ## # # # ## # # ## ## # # # # ## #
|
||||
# # ###### # # # # # # # # ## ## # # # ## # # # # # # ## # # ## # # ##
|
||||
# # # # # ## # # # # # # # # ## # ## # #### # ### #### ## # # ## ##
|
||||
## # # ## # ### # #### ## # ### ## # # # # ### # ## # # # # #
|
||||
# # ### # ### # ## # ## ## # # # ### ##### ## ### # ## ### # # # ## ###### #
|
||||
## # # # ## # # #### # # ## # ## # # # # # # # # # # # # #
|
||||
## # # # ## #### # ### ### ## # ## ##### # # # # # # # # # # ##### # # ##
|
||||
# ## ## # # # # ### ## # # ### ### ## # # # # ## # # ## ### # # # ###
|
||||
# ## ## ## ### # # #### # ## ## ## ### ### # # ## ##
|
||||
## # # ##### #### # # ## ## ### # # # # # # # # # # ### # #### #
|
||||
# # # # # # #### # # ## # # # ## # # # # # # # ### # # ##
|
||||
## ### ## ### # ## ## ### # ## # # # # # # # # # # #### ## ##
|
||||
## # ### ## ## # # ### # # #### # # # ### # # # # # # #### # #
|
||||
# # # ## ### # # # # # # ## ## # # ## ## # ## # # # # ### ## # #
|
||||
# ### # ### ## # # # # # # ## # ###### # ## ## ## # ## ## ## # ## # #
|
||||
# # # # # ## # # # # # # ## # # # ###### # # ### # #
|
||||
# # ## # # ## # # ## ### # ## ## ## # # # # # # # # # ## # # #
|
||||
## #### ## ### #### # # ### # # # # # ## # ## # # ##### ## ## # # ## #
|
||||
## # # # ## # ## # # ## # #### # # ### # #### # ## # ##### # # # #
|
||||
# # # # # ## #### # # ## # # # # ## # ## ## # # # ## # # ## ## ### # #
|
||||
# # # ## # ## # # ## ## # ## # # ## # ## # # # ##### #
|
||||
## #### ## ##### # ### # ### # # ## # ## # # # # # # # ## # ### # ## #
|
||||
# # # # # ## # ## # ## ## # # ### # ####### # # ## # ### ## ## ## ## ## #
|
||||
### ## # ## ## # ## # ### ### # ### # # # ###### ### ### # # # ## ### # #
|
||||
## # ## ## # ## ### # # # # ## # ### # ### ## # ## # # # # #
|
||||
# # ## ## ## # # # # ## # # ## # ## # # # ## # # # # # # # # ## # # #
|
||||
# # # ## # ## ## ## #### ## ## ## ### ##### ###### ## ### # # #
|
||||
# # ## # # # # ## # # # # # ## # #### ## # ## # ### # ## #
|
||||
# # ## # # # ### # # # # ## ### ## # ## # # # # # ## # # # ### ## # #
|
||||
# ## # # # ## # # # # # ## # # # # ## # # # # ###### ## ### # #
|
||||
# ## ## # ### # # ## ####### ## # ####### # # # # ## # ### # ## # # #
|
||||
## ### ## ### # ## # # ## ### # ### ### # # # ## # # ## # ### # #
|
||||
# # # ### ## # # ## # ## ## # ### # # # ### ###### # # # #
|
||||
## # ### ## # ### ## ## # ## # ## ## ### ## ### ### ## ## # ## #
|
||||
# # #### ## # # ## ## # #### # ### # ## ## # # # # # ## # #
|
||||
# # # # #### # # # ### ## # ## ## ## # # ## # ##### # # # # # ## # #### # # #
|
||||
# # ### # # ## #### # # # # ## ## # ## ## ### # ## ## ## # ## #
|
||||
## # ## # # # # # ## ## # ## ## ## # ## # #### ## # ## #
|
||||
# # # ## # ## # # # # ### # # ## ## # # # # # ### # ### ## # # ## #
|
||||
# # # ### # # ## ## # # ## # ### # # ### # ## # ### # ## ## ## # #
|
||||
### # ## # # #### ### ## # ## # ## # ## #### # # ###### # # #### # ## #
|
||||
# # # # # # ### # # # # ## #### ### # # # # # ## # # # #### # #### # #
|
||||
## ## # ## # # # # # ## # ### #### # ## ### # ##### ### ## ### # # #
|
||||
# # # ####### ## ### # ####### # # # ####### # # # ### # # ## # # # #
|
||||
## # # ## ## ## # ### ## ## ### ## ## # # ## # ## ## # # # # #
|
||||
### # # #### ### # # ## # ## # # # #### # # # # # # # # ## # ## #
|
||||
# ##### # ## ### ## #### # # # ## #### # # # # ## # # ## # #
|
||||
# # # # # ### # ## #### # # # ### # # # # ## # # # # # # #
|
||||
# # ## ## #### # # ### ## ## ### ### ## ## # # # # # ## # ## ### #
|
||||
## # # ## # # ## # ## # ### # ### # # # ## # ### #### # ## #
|
||||
# ## # # # # ## ## # # # # ## # ### ## ###### ### # ## ### # # # # # #
|
||||
### # # # # #### # # # # ### ##### # ## # ## # # ## # # # ## #
|
||||
# # # # ##### # # #### # # # ## # ## # # ## ### # # ## # #### #
|
||||
### ## # # # ## # # ## # # ## # # # ### ## ## # ### # # ## # # # # #
|
||||
#### # # # # ## # # # ## ### # # # ### # ## # # ## # # # ## # #
|
||||
# # # ## # ## # # ## ### # ## ## # ## # ## ## # # # ## # # ### ## ## ## #
|
||||
# # # ## # # # ## # ## ## # ## # ## ## #### #### # ## # # #
|
||||
## # # #### ### ## # #### ### ### # ## # # ## ## # ## # ### #
|
||||
# ## ##### # # ## ### ### # # # # ### #### ## ## ## ## ### ## # #
|
||||
# # ## # ## ## # # ### # # # # ## # ### ## ## ## ## ## # # # #
|
||||
# #### # # #### # ## ### ###### # # # ## # # # # # # # # # #### ## # # # #
|
||||
# #### # ### ##### # ## ## # # ## ## # ## ## # ## ### # # # # # # #
|
||||
# # ## # # # ## # # ## ## # # # # ## # # # ## ### # ## # #
|
||||
### # ## # # # ## # # # #### ##### # # ## # ## # # # # ### # #
|
||||
# # # # ### # ## # # # # ## # # # ### # ## # # # # # # # # # # # #
|
||||
## # # # # ## ## # #### ## # # ## # # # # # ### # # # #### # # ## ## # # #
|
||||
## # # ## # #### # # # # ## # ### ## ## #### # ## ## # ## ## #### ## ### #### #
|
||||
# ### ### ### # ### ### ## # # # ###### # # ### ## # # # # # # # #
|
||||
## ### ## # ## # ## # ## ### # # # #### ### ### # #
|
||||
# # ## # # # ## ## # # # # ### ### # ### ### # # # # ### ## # #
|
||||
## # ## # # # # ###### ## ### # ### # # # ## # ## ## # ### # # # ## # ## #
|
||||
# ## # ## # # # ## ## # ## ## ## # ## # ## # # # # ## # # # #
|
||||
# ### # ## ## # #### # ##### # ## ## ## ### # # # # ### #
|
||||
## # ## # # # # ##### # ## # # # ## # ### # # # ## # ## # # # ## E#
|
||||
####################################################################################################
|
||||
50
stepinim/lab2_oop/docs/data/medium_2lab.txt
Normal file
50
stepinim/lab2_oop/docs/data/medium_2lab.txt
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
##################################################
|
||||
#S ## ### # # # #### # ## #
|
||||
# # ## # # # # ##### ### # ### # #
|
||||
# ## #### # ### ### ## # # #### ### # # #
|
||||
#### # # # # # ## # ####
|
||||
# ## # #### ## # # ## # # # #
|
||||
# ### # # # # ### # ##
|
||||
# # # # ## # # ## # ## # # #
|
||||
## # # # #### # # # # # ### ##
|
||||
## # # ## ## ### # # ## #
|
||||
## # # # # # # # # # # # # #
|
||||
# # ## # ## ## ## ## ## # ###
|
||||
# ### # # # ## ## # # # # ## # ##
|
||||
## # # # # ## # # # # #
|
||||
# # # # # ### # ### # # ##
|
||||
# # # # # # # ##### # ### ##
|
||||
# # # # ## ## # # # # ### #### #
|
||||
## # # # ## # # ## # ### ## ### # #
|
||||
## # ## # # # # #
|
||||
# ##### ## ## # # # ## # ## # # #
|
||||
# # # # ### ##### ### # # ## #
|
||||
## # # # ## # # ## # # # # ## #
|
||||
#### # # ## # # # ## ## # ## ## #
|
||||
# # ### ### ## # ## #### # #
|
||||
# # ### # ## ##### # # # # ## # #
|
||||
## #### # # # # # #
|
||||
# ## # # # # ## ## # # ## # #
|
||||
# # ## # ### # ### ## # ## #
|
||||
# # # # # ## ## ## # #
|
||||
# # ## ### ## ## # # # # # ## # #
|
||||
## # # #### # #### # ## ## # ## #
|
||||
# # # ## # # # # # # # # #
|
||||
# ### ### # # # # # # # #
|
||||
# ## # # # ####### # # # # # # ### #
|
||||
## # # # # # # # # # ## # ## #
|
||||
# # # # ## ## # # ## ### # # # # # # #
|
||||
# ## # ### # # # # # # # #
|
||||
# # # # # # # ## # ### # #
|
||||
# # ### # # # ### # ## # # #
|
||||
# ### # # # # ## # # ## # #
|
||||
# ## # ### # ## ## ### # # # #
|
||||
# ## # # ## ## # # # ## # #
|
||||
# # ## # # # # # # # # ## #
|
||||
## # # # # # # # # # # # #
|
||||
# # # # ### ## ### # ## # # # #
|
||||
## ##### # # # ## # ## ### # #
|
||||
# ## # ## ##### # # # ## #
|
||||
# # # # # # ### # # # # # #
|
||||
### # # # # # # ## ## ### ## #E#
|
||||
##################################################
|
||||
15
stepinim/lab2_oop/docs/data/no_exit_2lab.txt
Normal file
15
stepinim/lab2_oop/docs/data/no_exit_2lab.txt
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
###############
|
||||
#S # #
|
||||
# #
|
||||
## # #
|
||||
# # # #
|
||||
## ## # # # #
|
||||
# # # #
|
||||
# # #
|
||||
# # # ## #
|
||||
## # # #
|
||||
## #
|
||||
## # # # #
|
||||
# # # ##
|
||||
# # #E#
|
||||
###############
|
||||
21
stepinim/lab2_oop/docs/data/results_2lab.csv
Normal file
21
stepinim/lab2_oop/docs/data/results_2lab.csv
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
maze,strategy,time_ms,visited,path_length
|
||||
small,BFS,0.1971,28,15
|
||||
small,DFS,0.062,16,15
|
||||
small,A*,0.1713,28,15
|
||||
small,Dijkstra,0.148,28,15
|
||||
medium,BFS,5.3354,1377,95
|
||||
medium,DFS,0.7772,282,151
|
||||
medium,A*,3.8703,500,95
|
||||
medium,Dijkstra,8.3548,1363,95
|
||||
large,BFS,16.9817,4391,195
|
||||
large,DFS,3.414,614,285
|
||||
large,A*,5.7519,559,195
|
||||
large,Dijkstra,31.018,4380,195
|
||||
empty,BFS,2.3012,400,39
|
||||
empty,DFS,1.4237,400,191
|
||||
empty,A*,3.6105,400,39
|
||||
empty,Dijkstra,2.9606,400,39
|
||||
no_exit,BFS,0.5791,136,0
|
||||
no_exit,DFS,0.5479,136,0
|
||||
no_exit,A*,0.9933,136,0
|
||||
no_exit,Dijkstra,0.8121,136,0
|
||||
|
Gitea Version: 1.22.0 |
