Commit 27d8a351 authored by Yoann Dufresne's avatar Yoann Dufresne
Browse files

bugfix: minimize the index size for small d-graph values

parent 51f71fb9
......@@ -17,6 +17,6 @@ class VariableDGIndex(AbstractDGIndex):
def add_dgraph(self, dg):
barcodes = dg.node_set
for size in range(len(barcodes)-self.size, len(barcodes)+1):
for size in range(max(1, len(barcodes)-self.size), len(barcodes)+1):
for tup in combinations(barcodes, size):
self.add_value(frozenset(tup), dg)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment