public class TimeFrequencyHolder extends gnu.trove.map.hash.TLongObjectHashMap<TimeFrequencyHolder.TimeFrequency> implements ReadWriteableBinary
ReadWriteableBinary
TLongObjectHashMap
Modifier and Type | Class and Description |
---|---|
static class |
TimeFrequencyHolder.TimeFrequency
Holds the number of a thing at a moment in time and the total number of
that thing seen across all time
|
Constructor and Description |
---|
TimeFrequencyHolder()
default
|
Modifier and Type | Method and Description |
---|---|
byte[] |
binaryHeader()
Header for binary input.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
recalculateCumulativeFrequencies()
For every held
TimeFrequencyHolder.TimeFrequency reset TimeFrequencyHolder.TimeFrequency
cumulativeFrequency = TimeFrequencyHolder.TimeFrequency periodFrequency and then go
through each in key-value order and use
TimeFrequency#combine(TimeFrequency) to calculate a cumulative
count |
String |
toString() |
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
clear, containsKey, containsValue, equals, forEachEntry, forEachKey, forEachValue, get, getNoEntryKey, hashCode, iterator, keys, keys, keySet, put, putAll, putAll, putIfAbsent, readExternal, rehash, remove, removeAt, retainEntries, setUp, transformValues, valueCollection, values, values, writeExternal
contains, forEach, getNoEntryValue, index, insertKey
calculateGrownCapacity, compact, computeMaxSize, computeNextAutoCompactionAmount, ensureCapacity, getAutoCompactionFactor, isEmpty, postInsertHook, reenableAutoCompaction, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSize
public TimeFrequencyHolder()
public void recalculateCumulativeFrequencies()
TimeFrequencyHolder.TimeFrequency
reset TimeFrequencyHolder.TimeFrequency
cumulativeFrequency = TimeFrequencyHolder.TimeFrequency
periodFrequency and then go
through each in key-value order and use
TimeFrequency#combine(TimeFrequency)
to calculate a cumulative
countpublic String toString()
toString
in class gnu.trove.map.hash.TLongObjectHashMap<TimeFrequencyHolder.TimeFrequency>
public void readBinary(DataInput in) throws IOException
ReadableBinary
readBinary
in interface ReadableBinary
in
- source to read from.IOException
- an error reading inputpublic byte[] binaryHeader()
ReadableBinary
binaryHeader
in interface ReadableBinary
binaryHeader
in interface WriteableBinary
public void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
out
- sink to write toIOException
- an error writing to out