/** * It contains two minimal examples to use the library. * * @author Esdras Lins Bispo Jr. */ public static void main(String[] args) { GLGraph g1; g1 = GLFactory.path(4); g1.show(); if (GLAlgorithm.isRegular(g1)) System.out.println(g1.getName() + " is regular."); else System.out.println(g1.getName() + " is not regular."); GLGraph g2 = new GLGraph("Circuit 4"); g2.addVertex("a"); g2.addVertex("b"); g2.addVertex("c"); g2.addVertex("d"); g2.addEdge("a", "b"); g2.addEdge("b", "c"); g2.addEdge("c", "d"); g2.addEdge("d", "a"); g2.show(); if (GLAlgorithm.isRegular(g2)) System.out.println(g2.getName() + " is regular."); else System.out.println(g2.getName() + " is not regular."); }