Ticket #11353 (closed enhancement: fixed)
bitset complement
| Reported by: | jason | Owned by: | jason |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-5.5 |
| Component: | misc | Keywords: | |
| Cc: | minh, ncohen | Work issues: | |
| Report Upstream: | N/A | Reviewers: | Nathann Cohen |
| Authors: | David Coudert | Merged in: | sage-5.5.beta1 |
| Dependencies: | Stopgaps: |
Description
It would be very useful if the Bitset and FrozenBitset? had complement operators that returned a new bitset that was the complement:
sage: list(~FrozenBitset([0,1],capacity=3)) [2]
There already is a fast bitset_complement cython function, so I think it's a matter of just wrapping it.
Attachments
Change History
comment:1 Changed 14 months ago by davidloeffler
- Owner changed from tbd to jason
- Component changed from PLEASE CHANGE to misc
comment:2 follow-up: ↓ 3 Changed 10 months ago by dcoudert
- Status changed from new to needs_review
- Authors set to David Coudert
The attached file adds the complement operation to FrozenBitset?, and so to Bitset, and binds it to tilde.
I needed it, so I did it.
comment:3 in reply to: ↑ 2 Changed 7 months ago by ncohen
I needed it, so I did it.
Love that quote :-D
Nathann
comment:4 Changed 7 months ago by ncohen
- Status changed from needs_review to positive_review
- Reviewers set to Nathann Cohen
WELL. I guess that there's nothing to say here :-)
Nathann
Note: See
TracTickets for help on using
tickets.

