public class SakoeChibaDTWGrammar extends Object implements SparseGrammar<SakoeChibaDTWGrammar.Nonterminal>
Modifier and Type | Class and Description |
---|---|
static class |
SakoeChibaDTWGrammar.Nonterminal |
Constructor and Description |
---|
SakoeChibaDTWGrammar() |
Modifier and Type | Method and Description |
---|---|
SakoeChibaDTWGrammar.Nonterminal[] |
dependencySort()
Returns the nonterminals of this grammar sorted according to their
dependencies on one another.
|
NavigableSet<MatrixEngine.MatrixCoordinate> |
entries(int M,
int N) |
EnumSet<SakoeChibaDTWGrammar.Nonterminal> |
getAccepting()
Returns the set of all accepting nonterminals of this grammar.
|
SakoeChibaDTWGrammar.Nonterminal |
getAxiom()
Returns the axiom of this grammar.
|
Class<SakoeChibaDTWGrammar.Nonterminal> |
getNonterminalClass()
Returns the enum class that lists the nonterminal symbols of
this grammar.
|
List<ProductionRule<SakoeChibaDTWGrammar.Nonterminal>> |
getPossibleRules(SakoeChibaDTWGrammar.Nonterminal nonterminal,
int leftSize,
int rightSize,
int M,
int N)
Returns all production rules of this grammar that can be applied
in the current situation.
|
boolean |
requires(OperationType type)
This method should return true if and only if this Grammar uses the given OperationType.
|
void |
setBandWidth(int bandWidth)
Sets the Sakoe-Chiba bandwidth.
|
public void setBandWidth(int bandWidth)
bandWidth
- The Sakoe-Chiba bandwidth.public Class<SakoeChibaDTWGrammar.Nonterminal> getNonterminalClass()
Grammar
getNonterminalClass
in interface Grammar<SakoeChibaDTWGrammar.Nonterminal>
public SakoeChibaDTWGrammar.Nonterminal[] dependencySort()
Grammar
dependencySort
in interface Grammar<SakoeChibaDTWGrammar.Nonterminal>
public SakoeChibaDTWGrammar.Nonterminal getAxiom()
Grammar
getAxiom
in interface Grammar<SakoeChibaDTWGrammar.Nonterminal>
public EnumSet<SakoeChibaDTWGrammar.Nonterminal> getAccepting()
Grammar
getAccepting
in interface Grammar<SakoeChibaDTWGrammar.Nonterminal>
public List<ProductionRule<SakoeChibaDTWGrammar.Nonterminal>> getPossibleRules(@NonNull SakoeChibaDTWGrammar.Nonterminal nonterminal, int leftSize, int rightSize, int M, int N)
Grammar
getPossibleRules
in interface Grammar<SakoeChibaDTWGrammar.Nonterminal>
nonterminal
- the nonterminal symbol on the left side of all
returned production rules.leftSize
- the nodes available in the left input sequence.rightSize
- the nodes available in the right right sequence.M
- the overall length of the left input sequence.N
- the overall length of the right input sequence.public NavigableSet<MatrixEngine.MatrixCoordinate> entries(int M, int N)
entries
in interface SparseGrammar<SakoeChibaDTWGrammar.Nonterminal>
public boolean requires(@NonNull OperationType type)
Grammar
requires
in interface Grammar<SakoeChibaDTWGrammar.Nonterminal>
type
- an OperationType.Copyright (C) 2016-2018 Benjamin Paaßen, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs . This documentation is licensed under the conditions of CC-BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/