On Friday, March 8, 2013 12:25:07 PM UTC-6, bryanturley wrote:

On Friday, March 8, 2013 9:39:43 AM UTC-6, Nate Finch wrote:
On Friday, March 8, 2013 10:26:48 AM UTC-5, Mateusz Czapliński wrote:
On Friday, March 8, 2013 2:44:17 AM UTC+1, Nate Finch wrote:

My question is, what do I name this thing? [...] Suggestions welcome.
a handful quick suggestions follow, then :) everyone likes to paint some
bike shed from time to time :)
If I wasn't talking about what to name it, I'd have to actually write
code for it ;)

bits.Set? (because "bitset")
bits.Map? (because "bitmap")
also possible - bits.Field (because bitfield)

But I think I've settled on bits.Slice. It really does represent the
actual functionality quite well.

I wrote something like this, just without the Append() and called it
Bitmap because it is a bitmap.

NewBitmap(size int32) *Bitmap
IsSet(ind int32) bool
Get(ind int32) bool
Heh Get and IsSet are the same, that was GetZero() ind int32 it found the
first unset bit.
Did that from memory.
Set(ind int32, x bool)

What mine does. Set automagically grew it but that might not be the best
idea for every use case.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 14 of 16 | next ›
Discussion Overview
groupgolang-nuts @
postedMar 8, '13 at 1:44a
activeMar 10, '13 at 10:25p



site design / logo © 2021 Grokbase