Example #1
0
        /// <summary> Create a SortedVIntList from an OpenBitSet.</summary>
        /// <param name="bits"> A bit set representing a set of integers.
        /// </param>
        public SortedVIntList(OpenBitSet bits)
        {
            SortedVIntListBuilder builder = new SortedVIntListBuilder(this);
            int nextInt = bits.NextSetBit(0);

            while (nextInt != -1)
            {
                builder.AddInt(nextInt);
                nextInt = bits.NextSetBit(nextInt + 1);
            }
            builder.Done();
        }
Example #2
0
		/// <summary> Create a SortedVIntList from an OpenBitSet.</summary>
		/// <param name="bits"> A bit set representing a set of integers.
		/// </param>
		public SortedVIntList(OpenBitSet bits)
		{
			SortedVIntListBuilder builder = new SortedVIntListBuilder(this);
			int nextInt = bits.NextSetBit(0);
			while (nextInt != - 1)
			{
				builder.AddInt(nextInt);
				nextInt = bits.NextSetBit(nextInt + 1);
			}
			builder.Done();
		}