|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.TreeMap<Double,Double>
csli.util.classify.berkeley.FeatureMap
public class FeatureMap
A TreeMap extension for feature data - an indexed vector of values for a single feature. Keys are Objects (intended to be times or utterance start times). Values are Objects (intended to be the corresponding values for this feature). As it's a TreeMap, keys will be returned in ascending order, which is what we want when writing out to file.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
| Constructor Summary | |
|---|---|
FeatureMap()
Initialise as an empty hash |
|
FeatureMap(File inputFile)
Initialise from an input feature data file |
|
| Method Summary | |
|---|---|
double |
get(double key)
Convenient interface to TreeMap for small-d doubles |
void |
loadFile(File file)
(Re-)Initialise from an input feature data file |
void |
put(double key,
double value)
Convenient interface to TreeMap for small-d doubles |
void |
toFile(File file)
Write feature data out to a feature data file |
| Methods inherited from class java.util.TreeMap |
|---|
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, size, subMap, subMap, tailMap, tailMap, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, isEmpty, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode, isEmpty |
| Constructor Detail |
|---|
public FeatureMap()
public FeatureMap(File inputFile)
inputFile - the input feature data file| Method Detail |
|---|
public void loadFile(File file)
file - the input feature data filepublic void toFile(File file)
file - the output feature data filepublic double get(double key)
key -
public void put(double key,
double value)
key - value -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||