Capacity returns the value of the highest possible *seen* value in this sparse bitarray.
()
| 196 | // Capacity returns the value of the highest possible *seen* value |
| 197 | // in this sparse bitarray. |
| 198 | func (sba *sparseBitArray) Capacity() uint64 { |
| 199 | if len(sba.indices) == 0 { |
| 200 | return 0 |
| 201 | } |
| 202 | |
| 203 | return (sba.indices[len(sba.indices)-1] + 1) * s |
| 204 | } |
| 205 | |
| 206 | // Equals returns a bool indicating if the provided bit array |
| 207 | // equals this bitarray. |