Metadata-Version: 2.4
Name: graphalgos
Version: 0.1.0
Summary: Graph algorithms library for educational purposes
Author: Student
Author-email: Student Name <student@example.com>
Project-URL: Homepage, https://github.com/student/graphalgos
Project-URL: Bug Tracker, https://github.com/student/graphalgos/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Education
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.19.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Dynamic: author
Dynamic: requires-python

import numpy as np
from graphalgos.graph.adjacency import AdjacencyMatrix
from graphalgos.algorithms.hamiltonian import HamiltonianSolver
from graphalgos.algorithms.floyd_warshall import FloydWarshall

# Создание графа
adj_matrix = np.array([
    [0, 1, 0, 1, 0],
    [1, 0, 1, 1, 1],
    [0, 1, 0, 0, 1],
    [1, 1, 0, 0, 1],
    [0, 1, 1, 1, 0]
])

# Поиск Гамильтонова цикла
solver = HamiltonianSolver()
cycle = solver.backtracking_hamiltonian(adj_matrix)
print(f"Гамильтонов цикл: {cycle}")

# Поиск кратчайших путей
dist, next_hop = FloydWarshall.floyd_warshall(adj_matrix)
print(f"Матрица расстояний:\n{dist}")
