add example to documentation
This commit is contained in:
		
							
								
								
									
										14
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								README.md
									
									
									
									
									
								
							@@ -30,6 +30,20 @@ What this program can do is produce these two automata, not only for the equilat
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
See `example.py`. The function `generate_automaton_coxeter_matrix` takes as argument the [Coxeter matrix] of the desired group and a boolean determining which of the two automata is generated. It returns the automaton as an adjacency list. In addition, the function `enumerate_group` can compute all group elements up to a given word length, including the edges of the Cayley graph. To do this, it uses both automata.
 | 
					See `example.py`. The function `generate_automaton_coxeter_matrix` takes as argument the [Coxeter matrix] of the desired group and a boolean determining which of the two automata is generated. It returns the automaton as an adjacency list. In addition, the function `enumerate_group` can compute all group elements up to a given word length, including the edges of the Cayley graph. To do this, it uses both automata.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For example, the following code would give us the first of the two automata above:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #!/usr/bin/python
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    import coxeter_automaton
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    coxeter_matrix = [[1, 3, 3],
 | 
				
			||||||
 | 
					                      [3, 1, 3],
 | 
				
			||||||
 | 
					                      [3, 3, 1]]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    graph = coxeter_automaton.generate_automaton_coxeter_matrix(coxeter_matrix, lex_reduced = False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    print(graph)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
For a more human-readable output, `dot_graph.py` generates dot files, which can be used as input to [Graphviz] to render the graph as a PDF file. The resulting images are not quite as nice as the manually drawn ones above, but usually good enough to be useful.
 | 
					For a more human-readable output, `dot_graph.py` generates dot files, which can be used as input to [Graphviz] to render the graph as a PDF file. The resulting images are not quite as nice as the manually drawn ones above, but usually good enough to be useful.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Brink-Howlett]: https://link.springer.com/article/10.1007/BF01445101
 | 
					[Brink-Howlett]: https://link.springer.com/article/10.1007/BF01445101
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user