.. Copyright (c) 2019-22, J. D. Mitchell

   Distributed under the terms of the GPL license version 3.

   The full license is in the file LICENSE, distributed with this software.

   This file was auto-generated by docs/generate_from_yml.py, do not edit.

ActionDigraph
=============

.. doxygenclass:: libsemigroups::ActionDigraph
   :project: libsemigroups

.. cpp:namespace:: libsemigroups::ActionDigraph


Member types
------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`adjacency_matrix_type`
     - The type of the adjacency matrix.


   * - :cpp:member:`algorithm`
     - An enum for specifying the algorithm to the functions :cpp:member:`number_of_paths()` .


   * - :cpp:member:`const_iterator_edges`
     - The type of an iterator pointing to the out-edges of a node in a digraph.


   * - :cpp:member:`const_iterator_nodes`
     - The type of an iterator pointing to the nodes of a digraph.


   * - :cpp:member:`const_iterator_scc`
     - The type of an iterator pointing to the nodes in a strongly connected component of a digraph.


   * - :cpp:member:`const_iterator_scc_roots`
     - The type of an iterator pointing to the roots of a strongly connected components of a digraph.


   * - :cpp:member:`const_iterator_sccs`
     - The type of an iterator pointing to the strongly connected components of a digraph.


   * - :cpp:member:`const_pilo_iterator`
     - Return type of :cpp:member:`cbegin_pilo`  and :cpp:member:`cend_pilo` .


   * - :cpp:member:`const_pislo_iterator`
     - Return type of :cpp:member:`cbegin_pislo`  and :cpp:member:`cend_pislo` .


   * - :cpp:member:`const_pstislo_iterator`
     - Return type of :cpp:member:`cbegin_pstislo`  and :cpp:member:`cend_pstislo` .


   * - :cpp:member:`const_reverse_iterator_nodes`
     - The type of a reverse iterator pointing to the nodes of a digraph.


   * - :cpp:member:`label_type`
     - The type of edge labels in a digraph.


   * - :cpp:member:`node_type`
     - The type of nodes in a digraph.


   * - :cpp:member:`scc_index_type`
     - The type of an index in a strongly connected component of a digraph.


   * - :cpp:member:`size_type`
     - Unsigned integer type.



Constructors
------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`ActionDigraph(ActionDigraph const&)`
     - Default copy constructor.


   * - :cpp:member:`ActionDigraph(ActionDigraph&&)`
     - Default move constructor.


   * - :cpp:member:`ActionDigraph(T, T)`
     - Construct from number of nodes and out degree.


   * - :cpp:member:`operator=(ActionDigraph const&)`
     - Default copy assignment constructor.


   * - :cpp:member:`operator=(ActionDigraph&&)`
     - Default move assignment constructor.



Static member functions
-----------------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`random(T, T, T, std::mt19937)`
     - Construct a random digraph from number of nodes, edges, and out-degree.


   * - :cpp:member:`random(T, T, std::mt19937)`
     - Construct a random digraph from number of nodes and out-degree.


   * - :cpp:member:`random_acyclic(T, T, T, std::mt19937)`
     - Construct a random acyclic digraph from number of nodes, edges, and out-degree.



Initialization
--------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`add_edge(node_type, node_type, label_type)`
     - Add an edge from one node to another with a given label.


   * - :cpp:member:`add_edge_nc(node_type, node_type, label_type)`
     - Add an edge from one node to another with a given label.


   * - :cpp:member:`add_nodes(size_t)`
     - Adds a number of new nodes.


   * - :cpp:member:`add_to_out_degree(size_t)`
     - Adds to the out-degree.


   * - :cpp:member:`init(T,T)`
     - Re-initialize the digraph to have ``m`` nodes and out-degree ``n``.


   * - :cpp:member:`remove_edge_nc(node_type, label_type)`
     - Remove an edge from a node with a given label.


   * - :cpp:member:`reserve(T, T) const`
     - Ensures that the digraph has capacity for a given number of nodes, and out-degree.


   * - :cpp:member:`restrict(size_t)`
     - Restrict the digraph to its first ``n`` nodes.


   * - :cpp:member:`swap_edges_nc(node_type, node_type, label_type)`
     - Swaps the edge with specified label from one node with another.



Operators
---------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`operator==(ActionDigraph const &) const`
     - Check if two action digraphs are equal.



Nodes, edges, neighbors
-----------------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`cbegin_edges(node_type) const`
     - Returns a random access iterator pointing at the first neighbor of a node.


   * - :cpp:member:`cbegin_edges_nc(node_type) const noexcept`
     - Returns a random access iterator pointing at the first neighbor of a node.


   * - :cpp:member:`cbegin_nodes() const noexcept`
     - Returns a random access iterator pointing at the first node of the digraph.


   * - :cpp:member:`cend_edges(node_type) const`
     - Returns a random access iterator pointing one-past-the-last neighbor of a node.


   * - :cpp:member:`cend_edges_nc(node_type) const noexcept`
     - Returns a random access iterator pointing one-past-the-last neighbor of a node.


   * - :cpp:member:`cend_nodes() const noexcept`
     - Returns a random access iterator pointing one-past-the-last node of the digraph.


   * - :cpp:member:`crbegin_nodes() const noexcept`
     - Returns a random access iterator pointing at the last node of the digraph.


   * - :cpp:member:`crend_nodes() const noexcept`
     - Returns a random access iterator pointing one-past-the-first node of the digraph.


   * - :cpp:member:`neighbor(node_type, label_type) const`
     - Get the range of the edge with given source node and label.


   * - :cpp:member:`next_neighbor(node_type, label_type) const`
     - Get the next neighbor of a node that doesn't equal :cpp:member:`libsemigroups::UNDEFINED` .


   * - :cpp:member:`number_of_edges() const`
     - Returns the number of edges.


   * - :cpp:member:`number_of_edges(node_type) const`
     - Returns the number of edges with given source node.


   * - :cpp:member:`number_of_nodes() const noexcept`
     - Returns the number of nodes.


   * - :cpp:member:`out_degree() const noexcept`
     - Returns the out-degree.


   * - :cpp:member:`remove_all_edges()`
     - Remove all of the edges in the digraph.


   * - :cpp:member:`table() const noexcept`
     - Returns a const reference to the underlying array.


   * - :cpp:member:`unsafe_neighbor(node_type, label_type) const`
     - Get the range of the edge with given source node and label.


   * - :cpp:member:`unsafe_next_neighbor(node_type, label_type) const`
     - Get the next neighbor of a node that doesn't equal :cpp:member:`libsemigroups::UNDEFINED` .


   * - :cpp:member:`validate() const noexcept`
     - Check every node has exactly :cpp:member:`out_degree()`  out-edges.



Strongly connected components
-----------------------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`cbegin_scc(scc_index_type) const`
     - Returns an iterator pointing to the first node in the scc with the specified id-number.


   * - :cpp:member:`cbegin_scc_roots() const`
     - Returns an iterator pointing to the root of the first scc.


   * - :cpp:member:`cbegin_sccs() const`
     - Returns an iterator pointing to the vector of nodes in the first scc.


   * - :cpp:member:`cend_scc(scc_index_type) const`
     - Returns an iterator pointing one past the last node in the scc with the specified id-number.


   * - :cpp:member:`cend_scc_roots() const`
     - Returns an iterator pointing one past the root of the last scc.


   * - :cpp:member:`cend_sccs() const`
     - Returns an iterator pointing one past the last vector of nodes in the final scc.


   * - :cpp:member:`number_of_scc() const`
     - Returns the number of strongly connected components.


   * - :cpp:member:`root_of_scc(node_type) const`
     - Returns the root of a strongly connected components containing a given node.


   * - :cpp:member:`scc_id(node_type) const`
     - Returns the id-number of the strongly connected component of a node.



Subdigraphs
-----------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`induced_subdigraph(node_type,node_type)`
     - 
   * - :cpp:member:`reverse_spanning_forest() const`
     - Returns a reverse spanning forest of the strongly connected components.


   * - :cpp:member:`spanning_forest() const`
     - Returns a spanning forest of the strongly connected components.



Path iterators
--------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`cbegin_panilo(node_type, size_t, size_t) const`
     - Returns an iterator for PANILO (Path And Node In Lex Order).


   * - :cpp:member:`cbegin_panislo(node_type, size_t, size_t) const`
     - Returns an iterator for PANISLO (Path And Node In Short Lex Order).


   * - :cpp:member:`cbegin_pilo(node_type, size_t, size_t) const`
     - Returns an iterator for PILO (Path In Lex Order).


   * - :cpp:member:`cbegin_pislo(node_type, size_t, size_t) const`
     - Returns an iterator for PISLO (Path In Short Lex Order).


   * - :cpp:member:`cbegin_pstilo(node_type, node_type, size_t, size_t) const`
     - Returns an iterator for PSTILO (Path Source Target In Lex Order).


   * - :cpp:member:`cbegin_pstislo(node_type, node_type, size_t, size_t) const`
     - Returns an iterator for PSTISLO (Path Source Target In Short Lex Order).


   * - :cpp:member:`cend_panilo() const`
     - Returns an iterator for PANILO (Path And Node In Lex Order).


   * - :cpp:member:`cend_panislo() const`
     - Returns an iterator for PANISLO (Path And Node In Short Lex Order).


   * - :cpp:member:`cend_pilo() const`
     - Returns an iterator for PILO (Path In Lex Order).


   * - :cpp:member:`cend_pislo() const`
     - Returns an iterator for PISLO (Path In Short Lex Order).


   * - :cpp:member:`cend_pstilo() const`
     - Returns an iterator for PSTILO (Path Source Target In Lex Order).


   * - :cpp:member:`cend_pstislo() const`
     - Returns an iterator for PSTISLO (Path Source Target In Short Lex Order).



Counting paths
--------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`number_of_paths(node_type) const`
     - Returns the number of paths from a source node.


   * - :cpp:member:`number_of_paths(node_type, node_type, size_t, size_t, algorithm) const`
     - Returns the number of paths between a pair of nodes with length in a given range.


   * - :cpp:member:`number_of_paths(node_type, size_t, size_t, algorithm) const`
     - Returns the number of paths starting at a given node with length in a given range.


   * - :cpp:member:`number_of_paths_algorithm(node_type) const noexcept`
     - Returns the :cpp:member:`algorithm`  used by :cpp:member:`number_of_paths()` .


   * - :cpp:member:`number_of_paths_algorithm(node_type, node_type, size_t, size_t) const`
     - Returns the :cpp:member:`algorithm`  used by :cpp:member:`number_of_paths()` .


   * - :cpp:member:`number_of_paths_algorithm(node_type, size_t, size_t) const`
     - Returns the :cpp:member:`algorithm`  used by :cpp:member:`number_of_paths()` .



.. toctree::
   :hidden:

   libsemigroups__actiondigraph__member_types.rst
   libsemigroups__actiondigraph__constructors.rst
   libsemigroups__actiondigraph__static_member_functions.rst
   libsemigroups__actiondigraph__initialization.rst
   libsemigroups__actiondigraph__operators.rst
   libsemigroups__actiondigraph__nodes__edges__neighbors.rst
   libsemigroups__actiondigraph__strongly_connected_components.rst
   libsemigroups__actiondigraph__subdigraphs.rst
   libsemigroups__actiondigraph__path_iterators.rst
   libsemigroups__actiondigraph__counting_paths.rst
