it.unimi.dsi.fastutil.floats.Float2IntMap Java Examples

The following examples show how to use it.unimi.dsi.fastutil.floats.Float2IntMap. 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: NoDictionarySingleColumnGroupKeyGenerator.java    From incubator-pinot with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
private int getKeyForValue(float value) {
  Float2IntMap map = (Float2IntMap) _groupKeyMap;
  int groupId = map.get(value);
  if (groupId == INVALID_ID) {
    if (_numGroups < _globalGroupIdUpperBound) {
      groupId = _numGroups;
      map.put(value, _numGroups++);
    }
  }
  return groupId;
}