Goto Chapter: Top 1 2 3 4 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

4 Function reference
 4.1 Public API
 4.2 Private API

4 Function reference

4.1 Public API

4.1-1 ShowEggBoxDiagram
‣ ShowEggBoxDiagram( semigroup[, options] )( function )

Returns: nothing

This function displays a visualization called an "egg-box diagram" of the given semigroup to the user by calling the display tools in the underlying JupyterViz package. Egg-box diagrams are described in Chapter 2.

Using the JupyterViz package means that one of two methods will be used for showing the user the resulting visualization:

It accepts the following arguments.

The fields you can provide in the options parameter are as follows. Each is optional, and its default value is documented below.

4.1-2 ShowCayleyGraph
‣ ShowCayleyGraph( semigroup[, options] )( function )

Returns: nothing by default but see ReturnJSON option below

This function displays the Cayley graph of the given semigroup to the user by calling the display tools in the underlying JupyterViz package. Cayley graphs are described in Chapter 3.

Using the JupyterViz package means that one of two methods will be used for showing the user the resulting visualization:

It accepts the following arguments.

The fields you can provide in the options parameter are as follows. Each is optional, and its default value is documented below.

4.2 Private API

None of these methods should need to be called by a client of this package. We provide this documentation here for completeness, not out of necessity.

4.2-1 SGPVIZ_HClassToRecord
‣ SGPVIZ_HClassToRecord( semigroup, hclass, options )( function )

Returns: a GAP record obeying the options passed in the third argument

This function converts the given H-class from the given semigroup into a GAP record amenable to conversion to JSON for passing to one of the HTML-based visualization tools from the JupyterViz package. Such conversion can be done by GAP's JSON package.

Attributes in the resulting record include:

4.2-2 SGPVIZ_DClassToRecord
‣ SGPVIZ_DClassToRecord( semigroup, dclass, options )( function )

Returns: a GAP record obeying the options passed in the third argument

This function converts the given D-class from the given semigroup into a GAP record amenable to conversion to JSON for passing to one of the HTML-based visualization tools from the JupyterViz package. Such conversion can be done by GAP's JSON package.

Attributes in the resulting record include:

4.2-3 SGPVIZ_EggBoxDiagramRecord
‣ SGPVIZ_EggBoxDiagramRecord( semigroup, options )( function )

Returns: a GAP record obeying the options passed in the third argument

This function converts the given semigroup into a GAP record amenable to conversion to JSON for passing to one of the HTML-based visualization tools from the JupyterViz package. Such conversion can be done by GAP's JSON package.

Attributes in the resulting record include:

4.2-4 SGPVIZ_HSV2RGB
‣ SGPVIZ_HSV2RGB( hue, saturation, value )( function )

Returns: a GAP list containing three integers in the range [0..255], to be interpreted as a point in RGB color space

This function converts a point in HSV color space into a point in RGB color space using the standard algorithm for doing so, available from many sources on the web.

This function is used internally by ShowCayleyGraph (4.1-2) to create distinct colors for each generator's edges.

4.2-5 SGPVIZ_GeneratorsAreSufficient
‣ SGPVIZ_GeneratorsAreSufficient( semigroup, generators, options )( function )

Returns: a boolean indicating whether the given list of generators is sufficient to make a Cayley graph for the given semigroup connected

This function defines a binary relation on the elements of the semigroup, meaning "there is a generator connecting these elements." It then asks GAP to compute the smallest equivalence relation containing that relation. If that equivalence relation has just one equivalence class, the Cayley graph would be connected.

This function is used internally by ShowCayleyGraph (4.1-2) to choose as few generators as possible to obtain a connected graph. See also SGPVIZ_GeneratorsSmallSubset (4.2-6).

4.2-6 SGPVIZ_GeneratorsSmallSubset
‣ SGPVIZ_GeneratorsSmallSubset( semigroup, generators, options )( function )

Returns: a sublist of the given list of generators, one just large enough to ensure that the Cayley graph of the given semigroup is connected

This function removes generators from the given list as long as doing so does not cause SGPVIZ_GeneratorsAreSufficient (4.2-5) to return false. When it cannot remove any more generators without violating that constraint, it returns the list it reached. This is done recursively. Note that not all branches of the recursion are followed, for the sake of efficiency.

This function is used internally by ShowCayleyGraph (4.1-2) to choose as few generators as possible to obtain a connected graph. See also SGPVIZ_GeneratorsAreSufficient (4.2-5).

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 Ind

generated by GAPDoc2HTML