src/tools/benchmark_tool/benchmark_tool/rqt_graph/dotcode.py
def _accumulate_image_topics(self, nodes_in, edges_in, node_connections):
        """
        Take topic nodes, edges and node connections.

        Returns topic nodes where image topics have been removed,
        edges where the edges to image topics have been removed, and
        a map with the connection to each virtual image topic node
        """
        removal_nodes = []
        image_nodes = {}
        # do not manipulate incoming structures
        nodes = copy.copy(nodes_in)
        edges = copy.copy(edges_in)
        for n in nodes:
            if unicode(n).endswith('/compressed'):
                prefix = unicode(n)[:-len('/compressed')].strip()
                image_topic_nodes = []
                image_topic_edges_out = list()
                image_topic_edges_in = list()
                for suffix in ['/compressed', '/compressedDepth', '/theora', '']:
                    for n2 in nodes:
                        if unicode(n2).strip() == prefix + suffix:
                            image_topic_nodes.append(n2)
                            if n2 in node_connections:
                                image_topic_edges_out.extend(node_connections[n2].outgoing)
                                image_topic_edges_in.extend(node_connections[n2].incoming)
                if len(image_topic_nodes) >= 3:
                    # found action
                    removal_nodes.extend(image_topic_nodes)
                    for e in image_topic_edges_out:
                        if e in edges:
                            edges.remove(e)
                    for e in image_topic_edges_in:
                        if e in edges:
                            edges.remove(e)
                    image_nodes[prefix] = {'topics': image_topic_nodes,
                                           'outgoing': image_topic_edges_out,
                                           'incoming': image_topic_edges_in}
        for n in removal_nodes:
            nodes.remove(n)
        return nodes, edges, image_nodes

        Take topic nodes, edges and node connections.

        Returns topic nodes where image topics have been removed,
        edges where the edges to image topics have been removed, and
        a map with the connection to each virtual image topic node
        
Take topic nodes, edges and node connections.
Returns topic nodes where image topics have been removed,
edges where the edges to image topics have been removed, and
a map with the connection to each virtual image topic node
Take topic nodes edges and node connections . Returns topic nodes where image topics have been removed edges where the edges to image topics have been removed and a map with the connection to each virtual image topic node
def _accumulate_image_topics(self, nodes_in, edges_in, node_connections):
        removal_nodes = []
        image_nodes = {}
        nodes = copy.copy(nodes_in)
        edges = copy.copy(edges_in)
        for n in nodes:
            if unicode(n).endswith('/compressed'):
                prefix = unicode(n)[:-len('/compressed')].strip()
                image_topic_nodes = []
                image_topic_edges_out = list()
                image_topic_edges_in = list()
                for suffix in ['/compressed', '/compressedDepth', '/theora', '']:
                    for n2 in nodes:
                        if unicode(n2).strip() == prefix + suffix:
                            image_topic_nodes.append(n2)
                            if n2 in node_connections:
                                image_topic_edges_out.extend(node_connections[n2].outgoing)
                                image_topic_edges_in.extend(node_connections[n2].incoming)
                if len(image_topic_nodes) >= 3:
                    removal_nodes.extend(image_topic_nodes)
                    for e in image_topic_edges_out:
                        if e in edges:
                            edges.remove(e)
                    for e in image_topic_edges_in:
                        if e in edges:
                            edges.remove(e)
                    image_nodes[prefix] = {'topics': image_topic_nodes,
                                           'outgoing': image_topic_edges_out,
                                           'incoming': image_topic_edges_in}
        for n in removal_nodes:
            nodes.remove(n)
        return nodes, edges, image_nodes
def _accumulate_image_topics ( self , nodes_in , edges_in , node_connections ) : removal_nodes = [ ] image_nodes = { } nodes = copy . copy ( nodes_in ) edges = copy . copy ( edges_in ) for n in nodes : if unicode ( n ) . endswith ( '/compressed' ) : prefix = unicode ( n ) [ : - len ( '/compressed' ) ] . strip ( ) image_topic_nodes = [ ] image_topic_edges_out = list ( ) image_topic_edges_in = list ( ) for suffix in [ '/compressed' , '/compressedDepth' , '/theora' , '' ] : for n2 in nodes : if unicode ( n2 ) . strip ( ) == prefix + suffix : image_topic_nodes . append ( n2 ) if n2 in node_connections : image_topic_edges_out . extend ( node_connections [ n2 ] . outgoing ) image_topic_edges_in . extend ( node_connections [ n2 ] . incoming ) if len ( image_topic_nodes ) >= 3 : removal_nodes . extend ( image_topic_nodes ) for e in image_topic_edges_out : if e in edges : edges . remove ( e ) for e in image_topic_edges_in : if e in edges : edges . remove ( e ) image_nodes [ prefix ] = { 'topics' : image_topic_nodes , 'outgoing' : image_topic_edges_out , 'incoming' : image_topic_edges_in } for n in removal_nodes : nodes . remove ( n ) return nodes , edges , image_nodes
Take topic nodes, edges and node connections.
Take topic nodes edges and node connections .
"""
        Take topic nodes, edges and node connections.

        Returns topic nodes where image topics have been removed,
        edges where the edges to image topics have been removed, and
        a map with the connection to each virtual image topic node
        """ # do not manipulate incoming structures # found action
self
nodes_in
edges_in
node_connections