Class SimpleObservationTable<I,D>
- java.lang.Object
-
- de.learnlib.datastructure.observationtable.reader.SimpleObservationTable<I,D>
-
- Type Parameters:
I
- The input type.D
- The output domain type.
- All Implemented Interfaces:
AccessSequenceTransformer<I>
,ObservationTable<I,D>
public class SimpleObservationTable<I,@Nullable D> extends Object implements ObservationTable<I,D>
This class represents the data structure of anObservationTable
without providing any meaningful functionality. It is used to store the result of reading string representations like withOTUtils.fromString(String, Alphabet, ObservationTableReader)
.
-
-
Field Summary
-
Fields inherited from interface de.learnlib.datastructure.observationtable.ObservationTable
NO_DISTINGUISHING_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description SimpleObservationTable(List<? extends Word<I>> suffixes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable D
cellContents(Row<I> row, int columnId)
Alphabet<I>
getInputAlphabet()
Retrieves the input alphabet used in this observation table.Collection<Row<I>>
getLongPrefixRows()
Row<I>
getRow(int idx)
Returns the specified row of the observation table.Row<I>
getRow(Word<I> prefix)
Collection<Row<I>>
getShortPrefixRows()
List<Word<I>>
getSuffixes()
Retrieves all suffixes in the table.boolean
isAccessSequence(Word<I> word)
int
numberOfDistinctRows()
Returns the number of distinct (regarding row values) rows in this observation table.List<D>
rowContents(Row<I> row)
Word<I>
transformAccessSequence(Word<I> word)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.learnlib.AccessSequenceTransformer
longestASPrefix
-
Methods inherited from interface de.learnlib.datastructure.observationtable.ObservationTable
findDistinguishingSuffix, findDistinguishingSuffix, findDistinguishingSuffixIndex, findDistinguishingSuffixIndex, findInconsistency, findUnclosedRow, getAllPrefixes, getAllRows, getLongPrefixes, getRowSuccessor, getShortPrefixes, getSuffix, isClosed, isConsistent, numberOfLongPrefixRows, numberOfRows, numberOfShortPrefixRows, numberOfSuffixes
-
-
-
-
Method Detail
-
getShortPrefixRows
public Collection<Row<I>> getShortPrefixRows()
- Specified by:
getShortPrefixRows
in interfaceObservationTable<I,D>
-
getLongPrefixRows
public Collection<Row<I>> getLongPrefixRows()
- Specified by:
getLongPrefixRows
in interfaceObservationTable<I,D>
-
getRow
public Row<I> getRow(int idx)
Description copied from interface:ObservationTable
Returns the specified row of the observation table.- Specified by:
getRow
in interfaceObservationTable<I,D>
- Parameters:
idx
- the index of the row- Returns:
- the row
-
getRow
public Row<I> getRow(Word<I> prefix)
- Specified by:
getRow
in interfaceObservationTable<I,D>
-
numberOfDistinctRows
public int numberOfDistinctRows()
Description copied from interface:ObservationTable
Returns the number of distinct (regarding row values) rows in this observation table. This number may be used as the upper bound for the (content ids of the) table rows.- Specified by:
numberOfDistinctRows
in interfaceObservationTable<I,D>
- Returns:
- the number of distinct rows
- See Also:
Row.getRowContentId()
-
getSuffixes
public List<Word<I>> getSuffixes()
Description copied from interface:ObservationTable
Retrieves all suffixes in the table.- Specified by:
getSuffixes
in interfaceObservationTable<I,D>
- Returns:
- all suffixes in the table
-
getInputAlphabet
public Alphabet<I> getInputAlphabet()
Description copied from interface:ObservationTable
Retrieves the input alphabet used in this observation table.- Specified by:
getInputAlphabet
in interfaceObservationTable<I,D>
- Returns:
- the input alphabet
-
cellContents
public @Nullable D cellContents(Row<I> row, int columnId)
- Specified by:
cellContents
in interfaceObservationTable<I,D>
-
rowContents
public List<D> rowContents(Row<I> row)
- Specified by:
rowContents
in interfaceObservationTable<I,D>
-
transformAccessSequence
public Word<I> transformAccessSequence(Word<I> word)
- Specified by:
transformAccessSequence
in interfaceAccessSequenceTransformer<I>
-
isAccessSequence
public boolean isAccessSequence(Word<I> word)
- Specified by:
isAccessSequence
in interfaceAccessSequenceTransformer<I>
-
-