zrygan / DSA-Project

Repository for CCDSALG Projects by Balcita, V., Ganituen, Z., and Jimenez, J.
0 stars 0 forks source link

Undirected Graph Implementation #4

Closed zrygan closed 1 month ago

zrygan commented 2 months ago

Test ::

2
AB BA -1
BA -1

Out ::

Adjacency Matrix:
        AB      BA
AB      0       1 
BA      0       0 
zrygan commented 2 months ago

Test ::

4
Bruce Diana -1
Clark Diana Hal -1
Diana Bruce Clark Hal -1
Hal Clark Diana -1

Out ::

Adjacency Matrix:
        Diana   Bruce   Clark   Hal
Diana   0       1       0       0 
Bruce   1       0       0       0 
Clark   1       1       0       1 
Hal     1       0       1       0 
zrygan commented 2 months ago

Test ::

5
Zhean Ganituen Max Dog Cat -1
Ganituen Dog -1
Dog -1
Max Cat Zhean -1
Cat Zhean Ganituen -1

Out ::

Adjacency Matrix:
        Zhean   Ganituen        Max     Dog     Cat
Zhean   0       1       1       1       1
Ganituen        0       0       0       1       0
Max     0       0       0       1       0
Dog     1       0       1       0       1
Cat     1       1       0       0       0
zrygan commented 2 months ago

@zrygan @Viennbalcita @jazjimenez for debugging and checking.

The reason I'm asking for rechecking because I am not really sure if the matrix output is correct. That is, the sequencing of the each vertex. Say in the first text case, why is "Diana" the first vertex?

zrygan commented 2 months ago

@zrygan @Viennbalcita @jazjimenez

THERE'S AN ISSUE HERE THAT SOME NODES HAVE A RELATIONSHIP WHEN THEY DON'T HAVE YET.

NEEDS DEBUGGING

zrygan commented 1 month ago

THIS is done just some debugging @jazjimenez @Viennbalcita