mirror of
https://github.com/guilhermewerner/paa
synced 2025-06-16 05:24:18 +00:00
Update debugs
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user