Nikita Tikhonov - #23
Conversation
…_tasks/graph_view/CMakeLists.txt renamed: additional_tasks/template_task/README.md -> additional_tasks/graph_view/README.md renamed: additional_tasks/template_task/src/main.cpp -> additional_tasks/graph_view/src/main.cpp new file: additional_tasks/graph_view/src/test.cpp new file: additional_tasks/graph_view/src/translation.hpp deleted: additional_tasks/template_task/src/test.cpp deleted: additional_tasks/template_task/src/utils.cpp deleted: additional_tasks/template_task/src/utils.hpp modified: task_01/src/test.cpp modified: task_01/src/topology_sort.cpp modified: task_01/src/topology_sort.hpp new file: task_02/src/search_bridges_and_vertices.hpp modified: task_02/src/test.cpp new file: task_03/src/Johnson.hpp modified: task_03/src/test.cpp new file: task_04/src/dijkstra.cpp new file: task_04/src/dijkstra.hpp modified: task_04/src/test.cpp new file: task_05/src/rmq.hpp modified: task_05/src/test.cpp new file: task_06/src/lca.hpp modified: task_06/src/test.cpp
| #include <unordered_set> | ||
| #include <vector> | ||
|
|
||
| std::vector<std::unordered_set<int>> convert_vec_vec_to_vec_set( |
There was a problem hiding this comment.
warning: function 'convert_vec_vec_to_vec_set' defined in a header file; function definitions in header files can lead to ODR violations [misc-definitions-in-headers]
std::vector<std::unordered_set<int>> convert_vec_vec_to_vec_set(
^Additional context
additional_tasks/graph_view/src/translation.hpp:4: make as 'inline'
std::vector<std::unordered_set<int>> convert_vec_vec_to_vec_set(
^| return graph_new; | ||
| } | ||
|
|
||
| std::vector<std::vector<int>> convert_vec_vec_to_matrix( |
There was a problem hiding this comment.
warning: function 'convert_vec_vec_to_matrix' defined in a header file; function definitions in header files can lead to ODR violations [misc-definitions-in-headers]
std::vector<std::vector<int>> convert_vec_vec_to_matrix(
^Additional context
additional_tasks/graph_view/src/translation.hpp:14: make as 'inline'
std::vector<std::vector<int>> convert_vec_vec_to_matrix(
^| return graph_new; | ||
| } | ||
|
|
||
| std::vector<std::pair<int, int>> convert_vec_vec_to_vec_pair( |
There was a problem hiding this comment.
warning: function 'convert_vec_vec_to_vec_pair' defined in a header file; function definitions in header files can lead to ODR violations [misc-definitions-in-headers]
std::vector<std::pair<int, int>> convert_vec_vec_to_vec_pair(
^Additional context
additional_tasks/graph_view/src/translation.hpp:33: make as 'inline'
std::vector<std::pair<int, int>> convert_vec_vec_to_vec_pair(
^| return graph_new; | ||
| } | ||
|
|
||
| std::vector<std::vector<int>> convert_vec_set_to_vec_vec( |
There was a problem hiding this comment.
warning: function 'convert_vec_set_to_vec_vec' defined in a header file; function definitions in header files can lead to ODR violations [misc-definitions-in-headers]
std::vector<std::vector<int>> convert_vec_set_to_vec_vec(
^Additional context
additional_tasks/graph_view/src/translation.hpp:43: make as 'inline'
std::vector<std::vector<int>> convert_vec_set_to_vec_vec(
^| return graph_new; | ||
| } | ||
|
|
||
| std::vector<std::vector<int>> convert_matrix_to_vec_vec( |
There was a problem hiding this comment.
warning: function 'convert_matrix_to_vec_vec' defined in a header file; function definitions in header files can lead to ODR violations [misc-definitions-in-headers]
std::vector<std::vector<int>> convert_matrix_to_vec_vec(
^Additional context
additional_tasks/graph_view/src/translation.hpp:52: make as 'inline'
std::vector<std::vector<int>> convert_matrix_to_vec_vec(
^| p->y = y; | ||
| p->next = this->edges[x]; | ||
| this->edges[x] = p; | ||
| this->degree[x]++; |
There was a problem hiding this comment.
warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index]
this->degree[x]++;
^| Edgenote *p; | ||
| for (i = 1; i <= this->nvertices; ++i) { | ||
| std::cout << i << ":"; | ||
| p = this->edges[i]; |
There was a problem hiding this comment.
warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index]
p = this->edges[i];
^| } | ||
|
|
||
| int Graph::EdgeClassification(int x, int y) { | ||
| if (parent[y] == x) return TREE; |
There was a problem hiding this comment.
warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index]
if (parent[y] == x) return TREE;
^|
|
||
| int Graph::EdgeClassification(int x, int y) { | ||
| if (parent[y] == x) return TREE; | ||
| if (discovered[y] && !processed[y]) return BACK; |
There was a problem hiding this comment.
warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index]
if (discovered[y] && !processed[y]) return BACK;
^|
|
||
| int Graph::EdgeClassification(int x, int y) { | ||
| if (parent[y] == x) return TREE; | ||
| if (discovered[y] && !processed[y]) return BACK; |
There was a problem hiding this comment.
warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index]
if (discovered[y] && !processed[y]) return BACK;
^
No description provided.