|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.wwu.tobikley.acgc.algorithms.CountingResult
public class CountingResult
Encapsulates the result of one iteration of a call of
CountingAlgorithm.algorithm().
The following three pieces of information are included:
CountingResults are sorted by the result value.
| Field Summary | |
|---|---|
private BigInteger |
result
The result itself. |
private long |
runTime
The runtime it took the algorithm to compute the result. |
private String |
type
The type of the result. |
| Constructor Summary | |
|---|---|
CountingResult(String type,
BigInteger result,
long runTime)
Creates a new instance of a counting result. |
|
| Method Summary | |
|---|---|
int |
compareTo(Object o)
CountingResults are compared by the value of their result. |
BigInteger |
getResult()
|
long |
getRunTime()
|
String |
getType()
|
String |
toString()
Returns [type]: [result] in [runTime]. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String type
private BigInteger result
private long runTime
| Constructor Detail |
|---|
public CountingResult(String type,
BigInteger result,
long runTime)
type - The type of the result.result - he result itself.runTime - The runtime it took the algorithm to compute the result.| Method Detail |
|---|
public String getType()
public BigInteger getResult()
public long getRunTime()
public String toString()
[type]: [result] in [runTime].
toString in class Objectpublic int compareTo(Object o)
result.
compareTo in interface Comparable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||