Skip to content

Homework #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 83 commits into
base: main
Choose a base branch
from
Open

Conversation

MrWh1teF0x
Copy link

@MrWh1teF0x MrWh1teF0x commented Nov 29, 2024

Задания от Акрамова Никиты, группа Б03-314

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions


#include <stdexcept>

#include "graph/vertex.hpp"

Choose a reason for hiding this comment

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

warning: 'graph/vertex.hpp' file not found [clang-diagnostic-error]

#include "graph/vertex.hpp"
         ^

@@ -0,0 +1,232 @@
#include <gtest/gtest.h>

#include "graph/weighted_graph.hpp"

Choose a reason for hiding this comment

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

warning: 'graph/weighted_graph.hpp' file not found [clang-diagnostic-error]

#include "graph/weighted_graph.hpp"
         ^

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions


#include <stdexcept>

#include "graph/vertex.hpp"

Choose a reason for hiding this comment

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

warning: 'graph/vertex.hpp' file not found [clang-diagnostic-error]

#include "graph/vertex.hpp"
         ^

@@ -0,0 +1,232 @@
#include <gtest/gtest.h>

#include "graph/weighted_graph.hpp"

Choose a reason for hiding this comment

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

warning: 'graph/weighted_graph.hpp' file not found [clang-diagnostic-error]

#include "graph/weighted_graph.hpp"
         ^

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

visited[v] = true;
if (p) d[v] = h[v] = h[p] + 1;

int children_count = 0;

Choose a reason for hiding this comment

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

warning: variable 'children_count' of type 'int' can be declared 'const' [misc-const-correctness]

Suggested change
int children_count = 0;
int const children_count = 0;

: graph(is_oriented) {
if (edges.size() != weights.size())
throw std::invalid_argument(
"The number of weighted edges is greater than the number of all "
Copy link
Contributor

Choose a reason for hiding this comment

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

ну не совсем greater скорее not equal) не сниму за это)

void DFS(Graph<T>& graph, std::unordered_map<T, bool>& visited,
std::vector<T>& res, const T& curr_vertex) {
if (visited[curr_vertex])
throw std::invalid_argument("Graph is not acyclic!");
Copy link
Contributor

Choose a reason for hiding this comment

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

лучше кажется написать что то типа Graph has a cycle, не буду это учитывать

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