The graph library takes in a name of a special graph and constructs a graph of that type. Possible inputs include: "petersen", "bidiakis cube", "desargues", "dodecahedron", "durer", "claw", "cubical", "f26a", "franklin", "chvatal", "heawood", "paw", "mobius", "nauru", "kite", "house", "bull", "bowtie", "dart". Each of these create the special graph described clearly by their name.
i1 : G = graphLibrary("petersen") o1 = Graph{0 => {1, 4, 5}} 1 => {0, 2, 6} 2 => {1, 3, 7} 3 => {2, 4, 8} 4 => {0, 3, 9} 5 => {0, 7, 8} 6 => {1, 8, 9} 7 => {2, 5, 9} 8 => {3, 5, 6} 9 => {4, 6, 7} o1 : Graph |
i2 : G = graphLibrary("f26a") o2 = Graph{0 => {1, 7, 25} } 1 => {0, 2, 20} 2 => {1, 3, 9} 3 => {2, 4, 22} 4 => {3, 5, 11} 5 => {4, 6, 24} 6 => {5, 7, 13} 7 => {0, 6, 8} 8 => {7, 9, 15} 9 => {2, 8, 10} 10 => {9, 11, 17} 11 => {4, 10, 12} 12 => {11, 13, 19} 13 => {6, 12, 14} 14 => {13, 15, 21} 15 => {8, 14, 16} 16 => {15, 17, 23} 17 => {10, 16, 18} 18 => {17, 19, 25} 19 => {12, 18, 20} 20 => {1, 19, 21} 21 => {14, 20, 22} 22 => {3, 21, 23} 23 => {16, 22, 24} 24 => {5, 23, 25} 25 => {0, 18, 24} o2 : Graph |
i3 : G = graphLibrary("chvatal") o3 = Graph{0 => {1, 3, 6, 11} } 1 => {0, 2, 4, 7} 2 => {1, 3, 5, 8} 3 => {0, 2, 4, 10} 4 => {1, 3, 5, 9} 5 => {2, 4, 6, 11} 6 => {0, 5, 7, 9} 7 => {1, 6, 8, 10} 8 => {2, 7, 9, 11} 9 => {4, 6, 8, 10} 10 => {3, 7, 9, 11} 11 => {0, 5, 8, 10} o3 : Graph |
The object graphLibrary is a method function.