CommunitiesAcrossTimeStep.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:ECoG-ClusterFlow 作者: sugeerth 项目源码 文件源码
def CreateTrackingNodes(self, partitionValues):
        i = 0
        self.counter = self.counter+1
        self.presentNodeObjects = []
        sceneRect = self.sceneRect()

        # Create the nodes which are rated in the way that it is organized
        # Just create one layer of the nodes here!! for now

        for communities, sub_communities in partitionValues.items():
            i = i + 1
            node_value=CommunityGraphNode(self,communities, sub_communities)
            node_value.setPos(sceneRect.left() + self.variableWidth*100, i*40)
            self.presentNodeObjects.append(node_value)
            self.scene.addItem(node_value)

        if self.first:
            value = len(partitionValues.values())
            self.first = False #*
            self.NewCommunitiesToBeAssigned = []
            self.NewCommunitiesToBeAssigned = deque([j for i,j in enumerate(self.distinguishableColors) if i > (13)])
            for i in self.presentNodeObjects:
                color = self.NewCommunitiesToBeAssigned.popleft()
                colorNew = QtGui.QColor(color[0],color[1],color[2])
                i.PutColor(colorNew)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号