-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
48 lines (39 loc) · 1.37 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "Graph.h"
int main()
{
Graph g1(7), g2(7);
//////////GRAPH 1////////////////
g1.insertEdge(1,2);
g1.insertEdge(1,4);
g1.insertEdge(2,5);
g1.insertEdge(3,1);
g1.insertEdge(4,5);
g1.insertEdge(5,7);
g1.insertEdge(6,3);
g1.insertEdge(6,7);
g1.insertEdge(4,7);
g1.printAdjacencyMatrix();
//////////GRAPH 2////////////////
g2.insertEdge(1,2);
g2.insertEdge(1,6);
g2.insertEdge(1,5);
g2.insertEdge(2,3);
g2.insertEdge(3,7);
g2.insertEdge(7,4);
g2.insertEdge(7,6);
g2.insertEdge(4,5);
g2.insertEdge(5,6);
if(g1.isIsomoprhic(g2))std::cout << "graph is isomorphic" << std::endl;
else std::cout << "graph is not isomorphic" << std::endl;
}