//Creates a deep copy of the dynamic bitset public DynamicBitset(DynamicBitset bitset) { m_Chunks = new uint[bitset.m_Chunks.Length]; for (int i = 0; i < bitset.m_Chunks.Length; ++i) { m_Chunks[i] = bitset.m_Chunks[i]; } Count = bitset.Count; m_TopMask = bitset.m_TopMask; }
public override bool Equals(object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } DynamicBitset bitset = (DynamicBitset)obj; if (bitset.Count != Count) { return(false); } for (int i = 0; i < m_Chunks.Length; ++i) { if (m_Chunks[i] != bitset.m_Chunks[i]) { return(false); } } return(true); }