Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/rev/bb91fbc0f69f
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 01:11:18 2012
Кодировка:
allpy: bb91fbc0f69f

allpy

changeset 740:bb91fbc0f69f

prevent graph.cliques() from dropping vertex by mistake Vertex should be dropped if it has less than (min_size - 1) neightbours (before: min_size). This bug causes blocks3ds failing to find any block after commit 590:8a81996f8bda, since after geometrical core parts were joined, size of each of them become 4 while min_size=4 is passed to graph.cliques().
author boris <bnagaev@gmail.com>
date Sat, 09 Jul 2011 15:48:27 +0200
parents a6a5cce7018e
children 12ee786aaab8
files allpy/graph.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/allpy/graph.py	Sat Jul 09 14:52:42 2011 +0200
     1.2 +++ b/allpy/graph.py	Sat Jul 09 15:48:27 2011 +0200
     1.3 @@ -231,7 +231,7 @@
     1.4          for graph in self.connected_components():
     1.5              if len(graph) >= minsize:
     1.6                  for v, neighbours_dict in graph.items():
     1.7 -                    if len(neighbours_dict) < minsize and v in graph:
     1.8 +                    if len(neighbours_dict) < minsize - 1 and v in graph:
     1.9                          graph.drop_vertex(v)
    1.10                  try:
    1.11                      cliques += graph.bron_kerbosh(timeout, minsize)