pub fn can_merge_tokens(&self, a: TokenSpecId, b: TokenSpecId) -> bool {
        if a == b || self.graph[a] != self.graph[b] {
            // Simple cases
            false
        } else {
            let space = &mut DfsSpace::new(&self.graph);
            !algo::has_path_connecting(&self.graph, a, b, Some(space))
                && !algo::has_path_connecting(&self.graph, b, a, Some(space))
        }
    }
/// Check if two tokens can be merged without creating a cycle
Check if two tokens can be merged without creating a cycle
Check if two tokens can be merged without creating a cycle
pub fn can_merge_tokens(&self, a: TokenSpecId, b: TokenSpecId) -> bool {
        if a == b || self.graph[a] != self.graph[b] {
            // Simple cases
            false
        } else {
            let space = &mut DfsSpace::new(&self.graph);
            !algo::has_path_connecting(&self.graph, a, b, Some(space))
                && !algo::has_path_connecting(&self.graph, b, a, Some(space))
        }
    }
pub fn can_merge_tokens ( & self , a : TokenSpecId , b : TokenSpecId ) -> bool { if a == b || self . graph [ a ] != self . graph [ b ] { // Simple cases false } else { let space = & mut DfsSpace :: new ( & self . graph ) ; ! algo :: has_path_connecting ( & self . graph , a , b , Some ( space ) ) && ! algo :: has_path_connecting ( & self . graph , b , a , Some ( space ) ) } }
Check if two tokens can be merged without creating a cycle
Check if two tokens can be merged without creating a cycle
&self
a
TokenSpecId
b
TokenSpecId
&self
a
TokenSpecId
b
TokenSpecId