Package net.automatalib.graph.ads
Class AbstractRecursiveADSSymbolNode<S,I,O,N extends RecursiveADSNode<S,I,O,N>>
- java.lang.Object
-
- net.automatalib.graph.ads.AbstractRecursiveADSSymbolNode<S,I,O,N>
-
- Type Parameters:
S
- (hypothesis) state typeI
- input alphabet typeO
- output alphabet typeN
- the concrete node type
- All Implemented Interfaces:
Iterable<N>
,FiniteRepresentation
,RecursiveADSNode<S,I,O,N>
,Graph<N,N>
,IndefiniteGraph<N,N>
,IndefiniteSimpleGraph<N>
,SimpleGraph<N>
- Direct Known Subclasses:
ADSSymbolNode
public abstract class AbstractRecursiveADSSymbolNode<S,I,O,N extends RecursiveADSNode<S,I,O,N>> extends Object implements RecursiveADSNode<S,I,O,N>
An abstract implementation of a symbol node, that may be used by other ADS-extending classes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.automatalib.graph.Graph
Graph.IntAbstraction<E>
-
-
Constructor Summary
Constructors Constructor Description AbstractRecursiveADSSymbolNode(@Nullable N parent, I symbol)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<O,N>
getChildren()
Returns a mapping to the child nodes ofthis
ADS node.@Nullable S
getHypothesisState()
Returns the hypothesis state associated with this ADS node.@Nullable N
getParent()
Returns the parent node ofthis
node.I
getSymbol()
Returns the input symbol associated with this ADS node.boolean
isLeaf()
A utility method indicating whetherthis
node represents a leaf of an ADS (and therefore referencing a hypothesis state) or an inner node (and therefore referencing an input symbol).void
setHypothesisState(S state)
void
setParent(N parent)
void
setSymbol(I symbol)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.automatalib.graph.Graph
getAdjacentNodes, getOutgoingEdgesIterator
-
Methods inherited from interface net.automatalib.graph.IndefiniteGraph
getAdjacentNodesIterator, getEdgesBetween
-
Methods inherited from interface net.automatalib.graph.IndefiniteSimpleGraph
createDynamicNodeMapping, createStaticNodeMapping, isConnected
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface net.automatalib.graph.ads.RecursiveADSNode
getNodesForRoot, getOutgoingEdges, getTarget, getVisualizationHelper
-
Methods inherited from interface net.automatalib.graph.SimpleGraph
getNodes, iterator, nodeIDs, size
-
-
-
-
Method Detail
-
getSymbol
public I getSymbol()
Description copied from interface:RecursiveADSNode
Returns the input symbol associated with this ADS node.- Specified by:
getSymbol
in interfaceRecursiveADSNode<S,I,O,N extends RecursiveADSNode<S,I,O,N>>
- Returns:
null
ifthis
is a leaf node (seeRecursiveADSNode.isLeaf()
), the associated input symbol otherwise.
-
setSymbol
public void setSymbol(I symbol)
Description copied from interface:RecursiveADSNode
-
getParent
public @Nullable N getParent()
Description copied from interface:RecursiveADSNode
Returns the parent node ofthis
node.
-
setParent
public void setParent(N parent)
-
getChildren
public Map<O,N> getChildren()
Description copied from interface:RecursiveADSNode
Returns a mapping to the child nodes ofthis
ADS node.- Specified by:
getChildren
in interfaceRecursiveADSNode<S,I,O,N extends RecursiveADSNode<S,I,O,N>>
- Returns:
- A mapping from hypothesis outputs to child ADS nodes. May be empty/unmodifiable (for leaf nodes), but
never
null
.
-
isLeaf
public boolean isLeaf()
Description copied from interface:RecursiveADSNode
A utility method indicating whetherthis
node represents a leaf of an ADS (and therefore referencing a hypothesis state) or an inner node (and therefore referencing an input symbol).
-
getHypothesisState
public @Nullable S getHypothesisState()
Description copied from interface:RecursiveADSNode
Returns the hypothesis state associated with this ADS node.- Specified by:
getHypothesisState
in interfaceRecursiveADSNode<S,I,O,N extends RecursiveADSNode<S,I,O,N>>
- Returns:
null
ifthis
is an inner node (seeRecursiveADSNode.isLeaf()
), the associated hypothesis state otherwise.
-
setHypothesisState
public void setHypothesisState(S state)
Description copied from interface:RecursiveADSNode
- Specified by:
setHypothesisState
in interfaceRecursiveADSNode<S,I,O,N extends RecursiveADSNode<S,I,O,N>>
- Parameters:
state
- the hypothesis state to be associated with this ADS node.
-
-