Skip to content

Conversation

@ermmmaks
Copy link
Owner

ни в какую не хочет уолкер работать с рандомом

@ermmmaks ermmmaks requested a review from KubEF December 15, 2025 12:39
Copy link
Collaborator

@KubEF KubEF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Честно говоря, это всё очень сильно пахнет нейросеточным кодом

Comment on lines +16 to +18
result = sum(probs)
if not(abs(result - 1.0) < 1e-6):
raise ValueError("Сумма вероятностей должна быть близка 1")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему "близка"? Она должна быть ему равна

from collections import deque

class WalkersAlias:
def __init__(self, events_and_probs):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Названия переменных очень странные. Вы вообще не используете принятую у нас терминологию: донор, рецепиент, барьер -- всего этого нет

@@ -0,0 +1,66 @@
def reducent_bits(n):
"""
Рассчитывает редуцентные биты p
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что такое "редуцентные" биты? Документация должна пояснять функцию. Почему возвращает число, а не список, если она рассчитывает биты?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants