it.unimi.dsi.fastutil.ints.IntRBTreeSet Java Examples

The following examples show how to use it.unimi.dsi.fastutil.ints.IntRBTreeSet. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClairvoyantPolicy.java    From caffeine with Apache License 2.0 5 votes vote down vote up
public ClairvoyantPolicy(Config config) {
  BasicSettings settings = new BasicSettings(config);
  policyStats = new PolicyStats("opt.Clairvoyant");
  accessTimes = new Long2ObjectOpenHashMap<>();
  infiniteTimestamp = Integer.MAX_VALUE;
  maximumSize = settings.maximumSize();
  future = new ArrayDeque<>(maximumSize);
  data = new IntRBTreeSet();
}
 
Example #2
Source File: IntervalTest.java    From database with GNU General Public License v2.0 4 votes vote down vote up
private IntSortedSet toSortedSet( Interval interval ) {
	if ( interval == EMPTY_INTERVAL ) return IntSortedSets.EMPTY_SET;
	IntSortedSet set = new IntRBTreeSet();
	for( int i = interval.left; i <= interval.right; i++ ) set.add( i );
	return set;
}