Update debugs

This commit is contained in:
Guilherme Werner
2023-06-18 14:33:12 -03:00
parent 345111b01e
commit 9fa159b94e
3 changed files with 29 additions and 29 deletions

View File

@ -2,19 +2,8 @@
void Graph::PrintIncidenceMatrix()
{
cout << " ";
for (int j = 0; j < edges; j++)
{
cout << j << " ";
}
cout << endl;
for (int i = 0; i < nodes; i++)
{
cout << i << " ";
for (int j = 0; j < edges; j++)
{
int val = this->matrix[i][j];
@ -35,6 +24,11 @@ void Graph::PrintIncidenceMatrix()
cout << endl;
}
void Graph::PrintAdjacencyMatrix()
{
Graph::_PrintAdjacencyMatrix(this->GetAdjacencyMatrix());
}
void Graph::AddEdge(int u, int v)
{
this->matrix[u][this->edges] = 1;
@ -117,7 +111,7 @@ Graph *Graph::ToTransitiveClosure()
}
cout << "TC:" << endl;
Graph::PrintAdjacencyMatrix(closure);
Graph::_PrintAdjacencyMatrix(closure);
return new Graph(closure, closure.size());
}