|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.unimi.dsi.fastutil.ints.AbstractInt2FloatFunction
it.unimi.dsi.fastutil.ints.AbstractInt2FloatMap
it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap
tl.lin.data.map.Int2FloatOpenHashMapWritable
public class Int2FloatOpenHashMapWritable
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.ints.AbstractInt2FloatMap |
|---|
it.unimi.dsi.fastutil.ints.AbstractInt2FloatMap.BasicEntry |
| Nested classes/interfaces inherited from interface it.unimi.dsi.fastutil.Hash |
|---|
it.unimi.dsi.fastutil.Hash.Strategy<K> |
| Nested classes/interfaces inherited from interface it.unimi.dsi.fastutil.ints.Int2FloatMap |
|---|
it.unimi.dsi.fastutil.ints.Int2FloatMap.Entry, it.unimi.dsi.fastutil.ints.Int2FloatMap.FastEntrySet |
| Field Summary |
|---|
| Fields inherited from class it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap |
|---|
entries, f, key, mask, maxFill, n, size, used, value |
| Fields inherited from class it.unimi.dsi.fastutil.ints.AbstractInt2FloatFunction |
|---|
defRetValue |
| Fields inherited from interface it.unimi.dsi.fastutil.Hash |
|---|
DEFAULT_GROWTH_FACTOR, DEFAULT_INITIAL_SIZE, DEFAULT_LOAD_FACTOR, FAST_LOAD_FACTOR, FREE, OCCUPIED, PRIMES, REMOVED, VERY_FAST_LOAD_FACTOR |
| Constructor Summary | |
|---|---|
Int2FloatOpenHashMapWritable()
Creates an Int2FloatOpenHashMapWritable object. |
|
| Method Summary | |
|---|---|
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)
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. |
| Methods inherited from class it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap |
|---|
add, addTo, clear, clone, containsKey, containsValue, get, get, growthFactor, growthFactor, hashCode, int2FloatEntrySet, isEmpty, keySet, put, put, rehash, rehash, remove, remove, shiftKeys, size, trim, trim, values |
| Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractInt2FloatMap |
|---|
containsValue, entrySet, equals, putAll, toString |
| Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractInt2FloatFunction |
|---|
containsKey, defaultReturnValue, defaultReturnValue, get |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface it.unimi.dsi.fastutil.ints.Int2FloatFunction |
|---|
defaultReturnValue, defaultReturnValue |
| Methods inherited from interface it.unimi.dsi.fastutil.Function |
|---|
containsKey, get |
| Methods inherited from interface java.util.Map |
|---|
containsKey, get |
| Constructor Detail |
|---|
public Int2FloatOpenHashMapWritable()
Int2FloatOpenHashMapWritable object.
| Method Detail |
|---|
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.Writablein - source for raw byte representation
IOException
public void decode()
throws IOException
IOExceptionpublic boolean hasBeenDecoded()
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.Writableout - where to write the raw byte representation
IOException
public byte[] serialize()
throws IOException
IOException
public static Int2FloatOpenHashMapWritable create(DataInput in)
throws IOException
in - source of serialized representation
IOException
public static Int2FloatOpenHashMapWritable create(byte[] bytes)
throws IOException
bytes - source of serialized representation
IOExceptionpublic void plus(Int2FloatOpenHashMapWritable m)
m - the other mappublic int dot(Int2FloatOpenHashMapWritable m)
m - the other mappublic void increment(int key)
key - key to increment
public 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 return
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||