pub fn start_of_eulerian_circuit(&self) -> Option<usize> {
        let has_circuit = if Ty::is_undirected() {
            // An undirected graph has an Eulerian cycle if and only if every vertex has even degree.
            self.in_deg.iter().all(|in_deg| (*in_deg % 2) == 0)
        } else {
            // A directed graph has an Eulerian cycle if and only if every vertex has equal in degree and out degree(in other words out-degree - in-degree = 0).
            self.diff_deg.iter().all(|diff| *diff == 0)
        };

        has_circuit.then(|| self.find_start_virt_id()).flatten()
    }
/// Finds id of the vertex to start the Eulerian circuit from.
///
/// # Returns
/// * `Some`: Containing the id of the starting vertex.
/// * `None`: If can not find a starting vertex for Eulerian circuit.
Finds id of the vertex to start the Eulerian circuit from.
Finds id of the vertex to start the Eulerian circuit from .
pub fn start_of_eulerian_circuit(&self) -> Option<usize> {
        let has_circuit = if Ty::is_undirected() {
            // An undirected graph has an Eulerian cycle if and only if every vertex has even degree.
            self.in_deg.iter().all(|in_deg| (*in_deg % 2) == 0)
        } else {
            // A directed graph has an Eulerian cycle if and only if every vertex has equal in degree and out degree(in other words out-degree - in-degree = 0).
            self.diff_deg.iter().all(|diff| *diff == 0)
        };
        has_circuit.then(|| self.find_start_virt_id()).flatten()
    }
pub fn start_of_eulerian_circuit ( & self ) -> Option < usize > { let has_circuit = if Ty :: is_undirected ( ) { // An undirected graph has an Eulerian cycle if and only if every vertex has even degree. self . in_deg . iter ( ) . all ( | in_deg | ( * in_deg % 2 ) == 0 ) } else { // A directed graph has an Eulerian cycle if and only if every vertex has equal in degree and out degree(in other words out-degree - in-degree = 0). self . diff_deg . iter ( ) . all ( | diff | * diff == 0 ) } ; has_circuit . then ( | | self . find_start_virt_id ( ) ) . flatten ( ) }
Finds id of the vertex to start the Eulerian circuit from.
Finds id of the vertex to start the Eulerian circuit from .
&self
`Some`: Containing the id of the starting vertex.
`None`: If can not find a starting vertex for Eulerian circuit.
` Some ` : Containing the id of the starting vertex . ` None ` : If can not find a starting vertex for Eulerian circuit .
&self