Method: NetworkX::Graph.dodecahedral_graph
- Defined in:
- lib/networkx/others/generators.rb
.dodecahedral_graph ⇒ Object
12
166 167 168 169 170 171 172 |
# File 'lib/networkx/others/generators.rb', line 166 def self.dodecahedral_graph edges = (0...19).map { |k| [k, k + 1] } edges.concat [[0, 19], [0, 10], [1, 8], [2, 6], [3, 19], [4, 17], [5, 15], [7, 14], [9, 13], [11, 18], [12, 16]] graph = new(name: 'dodecahedral_graph') graph.add_edges(edges) graph end |