cayleypy.create_graph
- cayleypy.create_graph(*, generators_permutations: list[list[int]] | Tensor | ndarray | None = None, generators_matrices: list[MatrixGenerator | list | ndarray] | None = None, generator_names: list[str] | None = None, name: str = '', central_state=None, make_inverse_closed: bool = False, **kwargs) CayleyGraph [source]
Creates CayleyGraph.
All arguments are optional, but one of these must be specified:
generators_permutations
,generators_matrices
,name
.Additional arguments may be passed via kwargs:
when creating graph by
name
, other parameters of the graph (such as “n”) that will be passed toprepare_graph
,any arguments that are accepted by
CayleyGraph
constructor (e.g.verbose=2
).r.
This function allows to create graphs in a uniform way. It is useful when you want to specify graph type and parameters in a config and have the same code handling different configs.
This is not recommended in most cases. Instead, create
CayleyGraphDef
using one of library classes and then pass it toCayleyGraph
constructor.- Parameters:
generators_permutations – List of generating permutations.
generators_matrices – List of generating n*n matrices.
generator_names – Names of the generators.
name – the name of the graph. If generators are not explicitly specified, this will be used to create graph, see
prepare_graph
source for supported names.central_state – central state of the graph.
make_inverse_closed – if generators are not inverse-closed and
make_inverse_closed=True
, adds inverse generators to make set of generators inverse-closed.
- Returns:
created CayleyGraph.