brainstorm/structure/construction.py
def collect_connected_layers(self):
        """Return a set of all layers that are somehow connected to this"""
        connectom = set()
        new_layers = {self}
        while new_layers:
            very_new_layers = set()
            for l in new_layers:
                very_new_layers |= {o[2] for o in l.outgoing}
                very_new_layers |= {i[0] for i in l.incoming}
            connectom |= new_layers
            new_layers = very_new_layers - connectom
        return connectom
Return a set of all layers that are somehow connected to this
Return a set of all layers that are somehow connected to this
Return a set of all layers that are somehow connected to this
def collect_connected_layers(self):
        connectom = set()
        new_layers = {self}
        while new_layers:
            very_new_layers = set()
            for l in new_layers:
                very_new_layers |= {o[2] for o in l.outgoing}
                very_new_layers |= {i[0] for i in l.incoming}
            connectom |= new_layers
            new_layers = very_new_layers - connectom
        return connectom
def collect_connected_layers ( self ) : connectom = set ( ) new_layers = { self } while new_layers : very_new_layers = set ( ) for l in new_layers : very_new_layers |= { o [ 2 ] for o in l . outgoing } very_new_layers |= { i [ 0 ] for i in l . incoming } connectom |= new_layers new_layers = very_new_layers - connectom return connectom
Return a set of all layers that are somehow connected to this
Return a set of all layers that are somehow connected to this
"""Return a set of all layers that are somehow connected to this"""
self