class documentation

This class inherits from the Graph class and is used to instantiate wheel graphs. It produces a 2-edge-colored loopless complete undirected graph in which the edges colored with the color 1 form a wheel graph, while all other edges are colored with the color 0. The vertices are labeled 0, 1, 2, …, n - 1, where n is the graph order. Vertex 0 is adjacent to every other vertex, while the subgraph induced by the remaining vertices forms the cycle (1, 2, 3, …, n - 1, 1). The graph order n must be at least 4. The class also allows selecting the initial graph formats in which an instance should be represented.

Note
The two bitmask formats can only be used when the graph order is at most 63.
Method __init__ This constructor initializes the wheel graph in the selected graph formats.

Inherited from Graph:

Class Method from_adjacency_matrix This class method initializes a Graph object in either the adjacency matrix format with color numbers or the adjacency matrix format with binary slices.
Class Method from_bitmask This class method initializes a Graph object in either the bitmask format for the out-neighborhoods or the bitmask format for the in-neighborhoods.
Class Method from_flattened This class method initializes a Graph object in exactly one of the four possible flattened graph formats.
Method __getitem__ This method returns the graph at the given index if this object models a batch of graphs. If this object models a single graph, it raises an IndexError.
Property adjacency_matrix_binary This property returns the numpy.ndarray of type numpy.uint8 representing the given graph or batch of graphs in the adjacency matrix format with binary slices.
Property adjacency_matrix_colors This property returns the numpy.ndarray of type numpy.uint8 representing the given graph or batch of graphs in the adjacency matrix format with color numbers.
Property allow_loops This property returns a bool indicating whether loops are allowed in the given graph or in each graph in the batch. The value True indicates that loops are allowed.
Property batch_size This property returns None if the object represents a single k-edge-colored looped complete graph. If the object represents a batch of k-edge-colored looped complete graphs of the same order, then this property returns the batch size, i...
Property bitmask_in This property returns the numpy.ndarray of type numpy.uint64 representing the given graph or batch of graphs in the bitmask format for the the in-neighborhoods.
Property bitmask_out This property returns the numpy.ndarray of type numpy.uint64 representing the given graph or batch of graphs in the bitmask format for the out-neighborhoods.
Property edge_colors This property returns the number of proper edge colors in the given graph or batch of graphs, i.e., k, as a positive int that is at least 2.
Property flattened_clockwise_binary This property returns the numpy.ndarray of type numpy.uint8 representing the given graph or batch of graphs in the flattened clockwise format with binary slices.
Property flattened_clockwise_colors This property returns the numpy.ndarray of type numpy.uint8 representing the given graph or batch of graphs in the flattened clockwise format with color numbers.
Property flattened_row_major_binary This property returns the numpy.ndarray of type numpy.uint8 representing the given graph or batch of graphs in the flattened row-major format with binary slices.
Property flattened_row_major_colors This property returns the numpy.ndarray of type numpy.uint8 representing the given graph or batch of graphs in the flattened row-major format with color numbers.
Property graph_order This property returns the order of the given graph or the common order of all graphs in the batch, as a positive int.
Property is_directed This property returns a bool indicating whether the given graph or each graph in the batch is directed. The value True indicates that the graph or graphs are directed.
Method __convert_graph_format This private method performs a direct conversion from the format representation of the given graph or batch of graphs in a selected input format to the format representation of that graph or batch of graphs in a selected output format...
Instance Variable __adjacency_matrix_binary Either a numpy.ndarray of type numpy.uint8 representing the graph structure in the adjacency matrix format with binary slices, if this format was used during initialization or computed afterwards, or None...
Instance Variable __adjacency_matrix_colors Either a numpy.ndarray of type numpy.uint8 representing the graph structure in the adjacency matrix format with color numbers, if this format was used during initialization or computed afterwards, or None...
Instance Variable __allow_loops A bool indicating whether the graph or each graph in the batch is allowed to have loops. If loops are not allowed, then all loops are removed from the considered looped complete graph or graphs and therefore do not exist.
Instance Variable __batch_size Either None, if the object models a single graph, or a positive int, if the object models a batch of graphs, specifying the batch size, i.e., the number of graphs in the batch.
Instance Variable __bitmask_in Either a numpy.ndarray of type numpy.uint64 representing the graph structure in the bitmask format for the in-neighborhoods, if this format was used during initialization or computed afterwards, or None...
Instance Variable __bitmask_out Either a numpy.ndarray of type numpy.uint64 representing the graph structure in the bitmask format for the out-neighborhoods, if this format was used during initialization or computed afterwards, or None...
Instance Variable __edge_colors The number of proper edge colors, i.e., k, given as a positive int that is at least 2.
Instance Variable __flattened_clockwise_binary Either a numpy.ndarray of type numpy.uint8 representing the graph structure in the flattened clockwise format with binary slices, if this format was used during initialization or computed afterwards, or ...
Instance Variable __flattened_clockwise_colors Either a numpy.ndarray of type numpy.uint8 representing the graph structure in the flattened clockwise format with color numbers, if this format was used during initialization or computed afterwards, or ...
Instance Variable __flattened_row_major_binary Either a numpy.ndarray of type numpy.uint8 representing the graph structure in the flattened row-major format with binary slices, if this format was used during initialization or computed afterwards, or ...
Instance Variable __flattened_row_major_colors Either a numpy.ndarray of type numpy.uint8 representing the graph structure in the flattened row-major format with color numbers, if this format was used during initialization or computed afterwards, or ...
Instance Variable __graph_order The graph order or the common order of all graphs in the batch, given as a positive int.
Instance Variable __is_directed A bool indicating whether the graph or each graph in the batch is a k-edge-colored looped complete directed graph or a k-edge-colored looped complete undirected graph.
def __init__(self, graph_formats: set[GraphFormat], graph_order: int):

This constructor initializes the wheel graph in the selected graph formats.

Parameters
graph_formats:set[GraphFormat]A nonempty set of GraphFormat items that determines which graph formats the graph should be initialized in.
graph_order:intThe graph order, given as a positive int not below 4.