public class Int2IntOpenHashMapWritable
extends it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap
implements org.apache.hadoop.io.Writable
it.unimi.dsi.fastutil.ints.AbstractInt2IntMap.BasicEntry| Constructor and Description |
|---|
Int2IntOpenHashMapWritable()
Creates an
Int2IntOpenHashMapWritable object. |
| Modifier and Type | Method and Description |
|---|---|
static Int2IntOpenHashMapWritable |
create(byte[] bytes)
Creates object from serialized representation.
|
static Int2IntOpenHashMapWritable |
create(DataInput in)
Creates object from serialized representation.
|
void |
decode()
In lazy decoding mode, populates the map with deserialized data.
|
long |
dot(Int2IntOpenHashMapWritable m)
Computes the dot product of this map with another map.
|
it.unimi.dsi.fastutil.ints.Int2IntMap.Entry[] |
getEntriesSortedByValue()
Returns entries sorted by descending value.
|
it.unimi.dsi.fastutil.ints.Int2IntMap.Entry[] |
getEntriesSortedByValue(int k)
Returns top k entries sorted by descending value.
|
int[] |
getKeys()
In lazy decoding mode, returns an array of all the keys if the map hasn't been decoded yet.
|
static boolean |
getLazyDecodeFlag()
Returns the value of the lazy decoding flag
|
int[] |
getValues()
In lazy decoding mode, returns an array of all the values if the map hasn't been decoded yet.
|
boolean |
hasBeenDecoded() |
void |
increment(int key)
Increments the key.
|
void |
increment(int key,
int n)
Increments the key.
|
void |
lazyplus(Int2IntOpenHashMapWritable m)
In lazy decoding mode, adds values from keys of another map to this map.
|
void |
plus(Int2IntOpenHashMapWritable m)
Adds values of keys from another map to this map.
|
void |
readFields(DataInput in) |
byte[] |
serialize()
Serializes this object to a byte array.
|
static void |
setLazyDecodeFlag(boolean b)
Sets the lazy decoding flag.
|
void |
write(DataOutput out) |
add, addTo, clear, clone, containsKey, containsValue, get, get, growthFactor, growthFactor, hashCode, int2IntEntrySet, isEmpty, keySet, put, put, rehash, rehash, remove, remove, shiftKeys, size, trim, trim, valuescontainsValue, entrySet, equals, putAll, toStringcontainsKey, defaultReturnValue, defaultReturnValue, getfinalize, getClass, notify, notifyAll, wait, wait, waitdefaultReturnValue, defaultReturnValuecompute, computeIfAbsent, computeIfPresent, containsKey, forEach, get, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic Int2IntOpenHashMapWritable()
Int2IntOpenHashMapWritable object.public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic void decode()
public boolean hasBeenDecoded()
public void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic byte[] serialize()
throws IOException
IOExceptionpublic static Int2IntOpenHashMapWritable create(DataInput in) throws IOException
in - source of serialized representationIOExceptionpublic static Int2IntOpenHashMapWritable create(byte[] bytes) throws IOException
bytes - source of serialized representationIOExceptionpublic void plus(Int2IntOpenHashMapWritable m)
m - the other mappublic long dot(Int2IntOpenHashMapWritable m)
m - the other mappublic void increment(int key)
key - key to incrementpublic void increment(int key,
int n)
key - key to incrementn - amount to incrementpublic static void setLazyDecodeFlag(boolean b)
b - the value of the lazy decoding flagpublic static boolean getLazyDecodeFlag()
public int[] getKeys()
public int[] getValues()
public void lazyplus(Int2IntOpenHashMapWritable m)
m - the other mappublic it.unimi.dsi.fastutil.ints.Int2IntMap.Entry[] getEntriesSortedByValue()
public it.unimi.dsi.fastutil.ints.Int2IntMap.Entry[] getEntriesSortedByValue(int k)
k - number of entries to returnCopyright © 2018. All rights reserved.