com.colloquial.arithcode
Class TestSet
java.lang.Object
|
+--com.colloquial.arithcode.TestSet
- class TestSet
- extends java.lang.Object
Package local helper class to compute statistics for a set
of compression experiments. Stores original and coded
bytes, average and cumulative compression and speeds.
Pretty printing is through report.
- Since:
- 1.1
- Version:
- 1.1
- Author:
- Bob Carpenter
- See Also:
TestStatistics
|
Field Summary |
private java.util.HashMap |
_tests
Storage for all of the tests. |
|
Constructor Summary |
(package private) |
TestSet()
|
|
Method Summary |
(package private) void |
clear()
Clears the test set by removing all results. |
(package private) void |
record(java.lang.String name,
int originalBytes,
int codedBytes,
long encodeTime,
long decodeTime)
Records an outcome for a compression for a given test name,
specifying original and coded bytes, along with encode and decode times. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_tests
private java.util.HashMap _tests
- Storage for all of the tests.
TestSet
TestSet()
record
void record(java.lang.String name,
int originalBytes,
int codedBytes,
long encodeTime,
long decodeTime)
- Records an outcome for a compression for a given test name,
specifying original and coded bytes, along with encode and decode times.
- Parameters:
name - Name of test.originalBytes - Number of bytes in input.codedBytes - Number of bytes after compression.encodeTime - Number of milliseconds required to encode.decodeTime - Number of milliseconds required to decode.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
clear
void clear()
- Clears the test set by removing all results.