pub(super) fn visualize<F>(&self, annotate: &F) -> VisGraph
    where
        F: Fn(&GlobalNodeId) -> String,
    {
        let cluster = self
            .nodes
            .region()
            .unwrap()
            .visualize(&self.nodes, annotate);
        let mut edges = Vec::new();

        for (from_id, to) in self.edges.iter() {
            let from_node = self.node_ref(from_id).unwrap();

            for (to_id, kind) in to.iter() {
                let to_node = self.node_ref(to_id).unwrap();
                let to_id = match to_node.kind {
                    NodeKind::StrictInput { output } => to_id.parent_id().unwrap().child(output),
                    _ => to_id.clone(),
                };

                if kind.is_stream() {
                    edges.push(VisEdge::new(
                        Node::node_identifier(from_id),
                        from_node.is_circuit(),
                        Node::node_identifier(&to_id),
                        to_node.is_circuit(),
                    ));
                }
            }
        }

        VisGraph::new(cluster, edges)
    }
/// Output circuit graph as visual graph.
Output circuit graph as visual graph.
Output circuit graph as visual graph .
pub(super) fn visualize<F>(&self, annotate: &F) -> VisGraph
    where
        F: Fn(&GlobalNodeId) -> String,
    {
        let cluster = self
            .nodes
            .region()
            .unwrap()
            .visualize(&self.nodes, annotate);
        let mut edges = Vec::new();
        for (from_id, to) in self.edges.iter() {
            let from_node = self.node_ref(from_id).unwrap();
            for (to_id, kind) in to.iter() {
                let to_node = self.node_ref(to_id).unwrap();
                let to_id = match to_node.kind {
                    NodeKind::StrictInput { output } => to_id.parent_id().unwrap().child(output),
                    _ => to_id.clone(),
                };
                if kind.is_stream() {
                    edges.push(VisEdge::new(
                        Node::node_identifier(from_id),
                        from_node.is_circuit(),
                        Node::node_identifier(&to_id),
                        to_node.is_circuit(),
                    ));
                }
            }
        }
        VisGraph::new(cluster, edges)
    }
pub ( super ) fn visualize < F > ( & self , annotate : & F ) -> VisGraph where F : Fn ( & GlobalNodeId ) -> String , { let cluster = self . nodes . region ( ) . unwrap ( ) . visualize ( & self . nodes , annotate ) ; let mut edges = Vec :: new ( ) ; for ( from_id , to ) in self . edges . iter ( ) { let from_node = self . node_ref ( from_id ) . unwrap ( ) ; for ( to_id , kind ) in to . iter ( ) { let to_node = self . node_ref ( to_id ) . unwrap ( ) ; let to_id = match to_node . kind { NodeKind :: StrictInput { output } => to_id . parent_id ( ) . unwrap ( ) . child ( output ) , _ => to_id . clone ( ) , } ; if kind . is_stream ( ) { edges . push ( VisEdge :: new ( Node :: node_identifier ( from_id ) , from_node . is_circuit ( ) , Node :: node_identifier ( & to_id ) , to_node . is_circuit ( ) , ) ) ; } } } VisGraph :: new ( cluster , edges ) }
Output circuit graph as visual graph.
Output circuit graph as visual graph .
&self
annotate
&F