Class CounterOracle<I,D>
- java.lang.Object
-
- de.learnlib.filter.statistic.oracle.CounterOracle<I,D>
-
- Type Parameters:
I
- input symbol typeD
- output domain type
- All Implemented Interfaces:
MembershipOracle<I,D>
,BatchProcessor<Query<I,D>>
,QueryAnswerer<I,D>
,StatisticCollector
,StatisticOracle<I,D>
- Direct Known Subclasses:
DFACounterOracle
,MealyCounterOracle
,MooreCounterOracle
public class CounterOracle<I,D> extends Object implements StatisticOracle<I,D>
AMembershipOracle
that counts both the number of queries and the total number of symbols occurring in all those queries.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.learnlib.oracle.MembershipOracle
MembershipOracle.DFAMembershipOracle<I>, MembershipOracle.MealyMembershipOracle<I,O>, MembershipOracle.MooreMembershipOracle<I,O>
-
-
Constructor Summary
Constructors Constructor Description CounterOracle(MembershipOracle<I,D> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Counter
getQueryCounter()
RetrievesCounter
for the number of queries posed to this oracle.StatisticData
getStatisticalData()
Returns this statistical data gathered by this collector.Counter
getSymbolCounter()
Retrieves theCounter
for the number of symbols in all queries posed to this oracle.void
processQueries(Collection<? extends Query<I,D>> queries)
Processes the specified collection of queries.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.learnlib.oracle.MembershipOracle
answerQuery, answerQuery, asOracle, processBatch, processQuery
-
-
-
-
Constructor Detail
-
CounterOracle
public CounterOracle(MembershipOracle<I,D> delegate)
-
-
Method Detail
-
processQueries
public void processQueries(Collection<? extends Query<I,D>> queries)
Description copied from interface:MembershipOracle
Processes the specified collection of queries. When this method returns, each of the contained queriesQuery.answer(Object)
method should have been called with an argument reflecting the SUL response to the respective query.- Specified by:
processQueries
in interfaceMembershipOracle<I,D>
- Parameters:
queries
- the queries to process- See Also:
Query.answer(Object)
-
getQueryCounter
public Counter getQueryCounter()
RetrievesCounter
for the number of queries posed to this oracle.- Returns:
- the counter of queries
-
getSymbolCounter
public Counter getSymbolCounter()
Retrieves theCounter
for the number of symbols in all queries posed to this oracle.- Returns:
- the counter of symbols
-
getStatisticalData
public StatisticData getStatisticalData()
Description copied from interface:StatisticCollector
Returns this statistical data gathered by this collector.- Specified by:
getStatisticalData
in interfaceStatisticCollector
- Returns:
- the statistical data gathered by this collector
-
-