public class Int2LongOpenHashMapWritable
extends it.unimi.dsi.fastutil.ints.Int2LongOpenHashMap
implements org.apache.hadoop.io.Writable
it.unimi.dsi.fastutil.ints.AbstractInt2LongMap.BasicEntry| Constructor and Description |
|---|
Int2LongOpenHashMapWritable()
Creates an
Int2IntOpenHashMapWritable object. |
| Modifier and Type | Method and Description |
|---|---|
static Int2LongOpenHashMapWritable |
create(byte[] bytes)
Creates object from serialized representation.
|
static Int2LongOpenHashMapWritable |
create(DataInput in)
Creates object from serialized representation.
|
void |
decode()
In lazy decoding mode, populates the map with deserialized data.
|
long |
dot(Int2LongOpenHashMapWritable m)
Computes the dot product of this map with another map.
|
it.unimi.dsi.fastutil.ints.Int2LongMap.Entry[] |
getEntriesSortedByValue()
Returns entries sorted by descending value.
|
it.unimi.dsi.fastutil.ints.Int2LongMap.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
|
long[] |
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,
long n)
Increments the key.
|
void |
lazyplus(Int2LongOpenHashMapWritable m)
In lazy decoding mode, adds values from keys of another map to this map.
|
void |
plus(Int2LongOpenHashMapWritable m)
Adds values of keys from another map to this map.
|
void |
readFields(DataInput in)
Deserializes the map.
|
byte[] |
serialize()
Serializes this object to a byte array.
|
static void |
setLazyDecodeFlag(boolean b)
Sets the lazy decoding flag.
|
void |
write(DataOutput out)
Serializes the map.
|
add, addTo, clear, clone, containsKey, containsValue, get, get, growthFactor, growthFactor, hashCode, int2LongEntrySet, 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 Int2LongOpenHashMapWritable()
Int2IntOpenHashMapWritable object.public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.Writablein - source for raw byte representationIOExceptionpublic void decode()
public boolean hasBeenDecoded()
public void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.Writableout - where to write the raw byte representationIOExceptionpublic byte[] serialize()
throws IOException
IOExceptionpublic static Int2LongOpenHashMapWritable create(DataInput in) throws IOException
in - source of serialized representationIOExceptionpublic static Int2LongOpenHashMapWritable create(byte[] bytes) throws IOException
bytes - source of serialized representationIOExceptionpublic void plus(Int2LongOpenHashMapWritable m)
m - the other mappublic long dot(Int2LongOpenHashMapWritable m)
m - the other mappublic void increment(int key)
key - key to incrementpublic void increment(int key,
long 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 long[] getValues()
public void lazyplus(Int2LongOpenHashMapWritable m)
m - the other mappublic it.unimi.dsi.fastutil.ints.Int2LongMap.Entry[] getEntriesSortedByValue()
public it.unimi.dsi.fastutil.ints.Int2LongMap.Entry[] getEntriesSortedByValue(int k)
k - number of entries to returnCopyright © 2018. All rights reserved.