public StarrySkyTree(int size) { this.Length = size; rootLength = 1 << (BitOperationsEx.MSB(size - 1) + 1); lazy = new T[(rootLength << 1) - 1]; data = new T[(rootLength << 1) - 1]; Array.Fill(lazy, op.Identity); Array.Fill(data, op.Identity); }
public void BitOperationInt64(long input, int popCount, int msb, int lsb) { BitOperationsEx.PopCount(input).Should().Be(popCount); BitOperationsEx.MSB(input).Should().Be(msb); BitOperationsEx.LSB(input).Should().Be(lsb); }