cc.mallet.grmm.util
Class MIntInt2ObjectMap
java.lang.Object
cc.mallet.grmm.util.MIntInt2ObjectMap
- All Implemented Interfaces:
- java.io.Serializable
public class MIntInt2ObjectMap
- extends java.lang.Object
- implements java.io.Serializable
Hash map that maps integer pairs to objects.
This uses much less space than an 2d array, if the mapping is sparse.
Created: Dec 14, 2005
- Version:
- $Id: MIntInt2ObjectMap.java,v 1.1 2007/10/22 21:37:58 mccallum Exp $
- Author:
- Serialized Form
Method Summary |
gnu.trove.TIntObjectIterator |
curry(int key1)
Returns an iterator over the set of (key2, value) pairs that match (key1). |
java.lang.Object |
get(int key1,
int key2)
|
int[] |
keys1()
Returns an array of first-level keys. |
int[] |
keys2(int key1)
|
java.lang.Object |
put(int key1,
int key2,
java.lang.Object value)
|
int |
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIntInt2ObjectMap
public MIntInt2ObjectMap()
MIntInt2ObjectMap
public MIntInt2ObjectMap(int initialCapacity)
put
public java.lang.Object put(int key1,
int key2,
java.lang.Object value)
get
public java.lang.Object get(int key1,
int key2)
curry
public gnu.trove.TIntObjectIterator curry(int key1)
- Returns an iterator over the set of (key2, value) pairs that match (key1).
keys1
public int[] keys1()
- Returns an array of first-level keys.
size
public int size()
keys2
public int[] keys2(int key1)