diff --git a/permuta/bisc/bisc.py b/permuta/bisc/bisc.py index 595f060..f27a2fb 100644 --- a/permuta/bisc/bisc.py +++ b/permuta/bisc/bisc.py @@ -511,6 +511,12 @@ class PropertyBitmaps: permutations, in lexicographic order. `good_counts` maps each length to its number of good permutations, and `bitmaps` to its bitmap. + `bitmaps` builds the bitmap of a length kept as indices each time it is + asked for it, so `items()`, `values()` and `dict(bitmaps)`, or `bitmaps` + given to another `PropertyBitmaps`, build every such length's bitmap: + 10.9 GB for length 14. Asking whether a length is there, iterating over + the lengths and `len()` build none. + Examples: >>> pb = PropertyBitmaps(Perm.is_increasing) >>> pb.add_length(3) @@ -520,6 +526,9 @@ class PropertyBitmaps: [Perm((0, 1, 2))] >>> len(pb.bad[3]) 5 + >>> pb.add_length(8) + >>> pb.good_counts[8], len(pb.bitmaps[8]) + (1, 5040) """ def __init__(