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

The following examples show how to use it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap. 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: DataFixerUpper.java    From DataFixerUpper with MIT License 5 votes vote down vote up
protected static int getLowestSchemaSameVersion(final Int2ObjectSortedMap<Schema> schemas, final int versionKey) {
    if (versionKey < schemas.firstIntKey()) {
        // can't have a data type before anything else
        return schemas.firstIntKey();
    }
    return schemas.subMap(0, versionKey + 1).lastIntKey();
}
 
Example #2
Source File: IntIndex.java    From tablesaw with Apache License 2.0 5 votes vote down vote up
public Selection atLeast(int value) {
  Selection selection = new BitmapBackedSelection();
  Int2ObjectSortedMap<IntArrayList> tail = index.tailMap(value);
  for (IntArrayList keys : tail.values()) {
    addAllToSelection(keys, selection);
  }
  return selection;
}
 
Example #3
Source File: IntIndex.java    From tablesaw with Apache License 2.0 5 votes vote down vote up
public Selection greaterThan(int value) {
  Selection selection = new BitmapBackedSelection();
  Int2ObjectSortedMap<IntArrayList> tail = index.tailMap(value + 1);
  for (IntArrayList keys : tail.values()) {
    addAllToSelection(keys, selection);
  }
  return selection;
}
 
Example #4
Source File: IntIndex.java    From tablesaw with Apache License 2.0 5 votes vote down vote up
public Selection atMost(int value) {
  Selection selection = new BitmapBackedSelection();
  Int2ObjectSortedMap<IntArrayList> head =
      index.headMap(value + 1); // we add 1 to get values equal to the arg
  for (IntArrayList keys : head.values()) {
    addAllToSelection(keys, selection);
  }
  return selection;
}
 
Example #5
Source File: IntIndex.java    From tablesaw with Apache License 2.0 5 votes vote down vote up
public Selection lessThan(int value) {
  Selection selection = new BitmapBackedSelection();
  Int2ObjectSortedMap<IntArrayList> head =
      index.headMap(value); // we add 1 to get values equal to the arg
  for (IntArrayList keys : head.values()) {
    addAllToSelection(keys, selection);
  }
  return selection;
}
 
Example #6
Source File: IntIndex.java    From tablesaw with Apache License 2.0 5 votes vote down vote up
public Selection atLeast(int value) {
  Selection selection = new BitmapBackedSelection();
  Int2ObjectSortedMap<IntArrayList> tail = index.tailMap(value);
  for (IntArrayList keys : tail.values()) {
    addAllToSelection(keys, selection);
  }
  return selection;
}
 
Example #7
Source File: IntIndex.java    From tablesaw with Apache License 2.0 5 votes vote down vote up
public Selection greaterThan(int value) {
  Selection selection = new BitmapBackedSelection();
  Int2ObjectSortedMap<IntArrayList> tail = index.tailMap(value + 1);
  for (IntArrayList keys : tail.values()) {
    addAllToSelection(keys, selection);
  }
  return selection;
}
 
Example #8
Source File: IntIndex.java    From tablesaw with Apache License 2.0 5 votes vote down vote up
public Selection atMost(int value) {
  Selection selection = new BitmapBackedSelection();
  Int2ObjectSortedMap<IntArrayList> head =
      index.headMap(value + 1); // we add 1 to get values equal to the arg
  for (IntArrayList keys : head.values()) {
    addAllToSelection(keys, selection);
  }
  return selection;
}
 
Example #9
Source File: IntIndex.java    From tablesaw with Apache License 2.0 5 votes vote down vote up
public Selection lessThan(int value) {
  Selection selection = new BitmapBackedSelection();
  Int2ObjectSortedMap<IntArrayList> head =
      index.headMap(value); // we add 1 to get values equal to the arg
  for (IntArrayList keys : head.values()) {
    addAllToSelection(keys, selection);
  }
  return selection;
}
 
Example #10
Source File: SparseTable.java    From jstarcraft-ai with Apache License 2.0 4 votes vote down vote up
public SparseTable(boolean orientation, int rowSize, int columnSize, Int2ObjectSortedMap<T> cells) {
    this.orientation = orientation;
    this.rowSize = rowSize;
    this.columnSize = columnSize;
    this.cells = cells;
}
 
Example #11
Source File: DataFixerUpper.java    From DataFixerUpper with MIT License 4 votes vote down vote up
protected DataFixerUpper(final Int2ObjectSortedMap<Schema> schemas, final List<DataFix> globalList, final IntSortedSet fixerVersions) {
    this.schemas = schemas;
    this.globalList = globalList;
    this.fixerVersions = fixerVersions;
}