|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.uds.cs.st.dd.core.OutcomeCache
This class holds test outcomes for configurations. This avoids running
the same test twice.
The outcome cache is implemented as a treap (prefix tree). Each node points
to the outcome of the remaining list. -- at least, that is the idea. This
class is not yet implemented.
Example: ([1, 2, 3], PASS), ([1, 2], FAIL), ([1, 4, 5], FAIL):
(2, FAIL)--(3, PASS)
/
(1, None)
\
(4, None)--(5, FAIL)
Constructor Summary | |
OutcomeCache()
Creates a new treap. |
Method Summary | |
void |
add(Collection c,
int result)
Adds the pair (c, result) to the cache. |
void |
addSorted(Collection c,
int result)
Adds the pair (c, result) to the cache. |
int |
lookup(Collection c)
Returns the result of a test case, if it is in the cache. |
int |
lookupSubset(Collection c)
Returns the result of a test case c' if there is a test case in the cache with c' being a subset of c or equal to c. |
int |
lookupSuperset(Collection c)
Returns the result of a test case c' if there is a test case in the cache with c' being a superset of c or equal to c. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OutcomeCache()
Method Detail |
public void add(Collection c, int result)
c
- the testcase (indexes of the applied deltas). c must be
a collection of @see java.util.Comparable. c does not
need to be sorted.result
- the outcome of this testcase. Should be one of
DD.NONE, DD.PASS, DD.FAIL, or DD.UNRESOLVED.public void addSorted(Collection c, int result)
c
- the testcase (indexes of the applied deltas). c must be
a collection of @see java.util.Comparable. Additionaly,
c must be sorted in ascending order. If no knowledge of the
sorting of c is available, use @see add instead.result
- the outcome of this testcase. Should be one of
DD.NONE, DD.PASS, DD.FAIL, or DD.UNRESOLVED.public int lookup(Collection c)
c
- the testcase (indexes of the applied deltas). c must be
a collection of @see java.util.Comparable. Additionaly,
c must be sorted in ascending order.
public int lookupSubset(Collection c)
c
- superset of any previously calculated sets.
public int lookupSuperset(Collection c)
c
- the set that is to be searched in the cache.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |