Class ReplacementResult<S,​I,​O>

  • Type Parameters:
    S - (hypothesis) state type
    I - input alphabet type
    O - output alphabet type

    public class ReplacementResult<S,​I,​O>
    extends Object
    A class that describes the possible result a SubtreeReplacer can return. A replacement may either be
    • a complete replacement
    • a partial replacement, that additionally defines which hypothesis states are not covered by the replacement
    • Constructor Detail

      • ReplacementResult

        public ReplacementResult​(ADTNode<S,​I,​O> nodeToReplace,
                                 ADTNode<S,​I,​O> replacement)
      • ReplacementResult

        public ReplacementResult​(ADTNode<S,​I,​O> nodeToReplace,
                                 ADTNode<S,​I,​O> replacement,
                                 Set<S> cutoutNodes)
    • Method Detail

      • getReplacement

        public ADTNode<S,​I,​O> getReplacement()
        The ADT subtree (root-node) that forms the replacement.
        Returns:
        the replacement
      • getNodeToReplace

        public ADTNode<S,​I,​O> getNodeToReplace()
        The ADT subtree (root-node) that should be replaced.
        Returns:
        the node to replace
      • getCutoutNodes

        public Set<S> getCutoutNodes()
        The set of hypothesis states that are not covered on the proposed replacement.
        Returns:
        the set