MCPcopy Index your code
hub / github.com/Workiva/go-datastructures / And

Method And

bitarray/bitarray.go:230–236  ·  view source on GitHub ↗

And will bitwise and two bit arrays and return a new bit array representing the result.

(other BitArray)

Source from the content-addressed store, hash-verified

228// And will bitwise and two bit arrays and return a new bit array
229// representing the result.
230func (ba *bitArray) And(other BitArray) BitArray {
231 if dba, ok := other.(*bitArray); ok {
232 return andDenseWithDenseBitArray(ba, dba)
233 }
234
235 return andSparseWithDenseBitArray(other.(*sparseBitArray), ba)
236}
237
238// Nand will return the result of doing a bitwise and not of the bit array
239// with the other bit array on each block.

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected