コード例 #1
0
ファイル: GeneratorTransitions.py プロジェクト: B-Rich/dart
    def __init__(self, rate_generator=None, expression_generator=None, *args, **kwargs):
        """prefix: prefix all rate variables with this prefix."""
        ChainComponent.__init__(self, *args, **kwargs)

        if not rate_generator:
            self.mRateGenerator = Rates()
        else:
            self.mRateGenerator = rate_generator

        if not expression_generator:
            self.mExpressionGenerator = Expressions()
        else:
            self.mExpressionGenerator = expression_generator
コード例 #2
0
 def buildGrammar(self, chain):
     """build grammar.
     
     This stub generically iterates over the alphabet and
     calls self.addTransitions for each pair of letters.
     """
     ChainComponent.buildGrammar(self, chain)
     alphabet = self.mChainGenerator.getAlphabet()
     l = len(alphabet)
     for l1 in range(0, l - 1):
         a = alphabet[l1]
         for l2 in range(l1 + 1, l):
             self.addTransitions(chain, a, alphabet[l2])
コード例 #3
0
ファイル: GeneratorTransitions.py プロジェクト: B-Rich/dart
 def buildGrammar(self, chain):
     """build grammar.
     
     This stub generically iterates over the alphabet and
     calls self.addTransitions for each pair of letters.
     """
     ChainComponent.buildGrammar(self, chain)
     alphabet = self.mChainGenerator.getAlphabet()
     l = len(alphabet)
     for l1 in range(0, l - 1):
         a = alphabet[l1]
         for l2 in range(l1 + 1, l):
             self.addTransitions(chain, a, alphabet[l2])
コード例 #4
0
    def __init__(self,
                 rate_generator=None,
                 expression_generator=None,
                 *args,
                 **kwargs):
        """prefix: prefix all rate variables with this prefix."""
        ChainComponent.__init__(self, *args, **kwargs)

        if not rate_generator:
            self.mRateGenerator = Rates()
        else:
            self.mRateGenerator = rate_generator

        if not expression_generator:
            self.mExpressionGenerator = Expressions()
        else:
            self.mExpressionGenerator = expression_generator
コード例 #5
0
 def buildGrammar(self, chain):
     """build grammar for chain by adding initial states."""
     ChainComponent.buildGrammar(self, chain)
コード例 #6
0
 def __init__(self, *args, **kwargs):
     ChainComponent.__init__(self, *args, **kwargs)
コード例 #7
0
ファイル: GeneratorInitialStates.py プロジェクト: B-Rich/dart
 def buildGrammar(self, chain):
     """build grammar for chain by adding initial states."""        
     ChainComponent.buildGrammar(self,chain)
コード例 #8
0
ファイル: GeneratorInitialStates.py プロジェクト: B-Rich/dart
 def __init__(self, *args, **kwargs):
     ChainComponent.__init__(self, *args, **kwargs )