public class Int2FloatOpenHashMapWritable
extends it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap
implements org.apache.hadoop.io.Writable
it.unimi.dsi.fastutil.ints.AbstractInt2FloatMap.BasicEntry| Constructor and Description |
|---|
Int2FloatOpenHashMapWritable()
Creates an
Int2FloatOpenHashMapWritable object. |
| Modifier and Type | Method and Description |
|---|---|
static Int2FloatOpenHashMapWritable |
create(byte[] bytes)
Creates object from serialized representation.
|
static Int2FloatOpenHashMapWritable |
create(DataInput in)
Creates object from serialized representation.
|
void |
decode()
In lazy decoding mode, populates the map with deserialized data.
|
int |
dot(Int2FloatOpenHashMapWritable m)
Computes the dot product of this map with another map.
|
it.unimi.dsi.fastutil.ints.Int2FloatMap.Entry[] |
getEntriesSortedByValue()
Returns entries sorted by descending value.
|
it.unimi.dsi.fastutil.ints.Int2FloatMap.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
|
float[] |
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,
float n)
Increments the key.
|
void |
lazyplus(Int2FloatOpenHashMapWritable m)
In lazy decoding mode, adds values from keys of another map to this map.
|
void |
plus(Int2FloatOpenHashMapWritable 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, int2FloatEntrySet, 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 Int2FloatOpenHashMapWritable()
Int2FloatOpenHashMapWritable object.public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic void decode()
throws IOException
IOExceptionpublic boolean hasBeenDecoded()
public void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic byte[] serialize()
throws IOException
IOExceptionpublic static Int2FloatOpenHashMapWritable create(DataInput in) throws IOException
in - source of serialized representationIOExceptionpublic static Int2FloatOpenHashMapWritable create(byte[] bytes) throws IOException
bytes - source of serialized representationIOExceptionpublic void plus(Int2FloatOpenHashMapWritable m)
m - the other mappublic int dot(Int2FloatOpenHashMapWritable m)
m - the other mappublic void increment(int key)
key - key to incrementpublic void increment(int key,
float 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 float[] getValues()
public void lazyplus(Int2FloatOpenHashMapWritable m)
m - the other mappublic it.unimi.dsi.fastutil.ints.Int2FloatMap.Entry[] getEntriesSortedByValue()
public it.unimi.dsi.fastutil.ints.Int2FloatMap.Entry[] getEntriesSortedByValue(int k)
k - number of entries to returnCopyright © 2018. All rights reserved.