Skip to content

DerevyankinKirill/SortLab#22

Open
KDerevyankin wants to merge 22 commits into
ValentinV95:mainfrom
KDerevyankin:main
Open

DerevyankinKirill/SortLab#22
KDerevyankin wants to merge 22 commits into
ValentinV95:mainfrom
KDerevyankin:main

Conversation

@KDerevyankin
Copy link
Copy Markdown

Можно проверять

@KDerevyankin
Copy link
Copy Markdown
Author

Можно проверять

@ValentinV95
Copy link
Copy Markdown
Owner

Код принят

@ValentinV95 ValentinV95 added the good first issue Good for newcomers label Dec 23, 2021
@KDerevyankin
Copy link
Copy Markdown
Author

Добавил отчёт.

@ValentinV95
Copy link
Copy Markdown
Owner

Отчет по сортировкам принят

Copy link
Copy Markdown
Owner

@ValentinV95 ValentinV95 left a comment

Choose a reason for hiding this comment

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

Код принят, есть небольшее замечание.
Необходимо также удалить служебные файлы

scanf_s("%d", &choose);
printf("Введите значение x:");
scanf_s("%f", &x);
switch (choose)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Лучше использовать в этом месте Enum

@ValentinV95
Copy link
Copy Markdown
Owner

Код по рядам принят (+). На будущие возможно избежать дублирование кода при подсчете разными методами в разных функциях

Copy link
Copy Markdown
Owner

@ValentinV95 ValentinV95 left a comment

Choose a reason for hiding this comment

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

Код метода Гаусса принят (+-, ближе к -+).
На несовместную систему выдает неверный ответ, из-за неправильной проверки

int size;
T* mas;
public:
Vector() :Vector(0)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Что подразумевается под математическим вектором размера 0?

Vector(int size)
{
this->size = size;
this->mas = new T[size];
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Нет проверки на размер

{
if ((*this)[i][j] * (*this)[i][j] > (*this)[i][max] * (*this)[i][max])
{
max = j;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Это поиск максимального в строке, а не столбце

}
if (i != max)
{
swap <Vector<T>>((*this)[i], (*this)[max]);
Copy link
Copy Markdown
Owner

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

good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants