Exemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     # Since we use flip, this must be an argument of a 'context' C that will manage the randomness. Note that
     # C is the last argument, so Cfirst=False below
     RecursiveLOTHypothesis.__init__(self,
                                     grammar=grammar,
                                     display="lambda recurse_, C: %s",
                                     *args,
                                     **kwargs)
Exemplo n.º 2
0
 def __init__(self, grammar=None, value=None, f=None, gamma=-30, **kwargs):
     RecursiveLOTHypothesis.__init__(self,
                                     grammar,
                                     value=value,
                                     f=f,
                                     **kwargs)
     self.gamma = gamma
     self.lg1mgamma = log1mexp(gamma)
Exemplo n.º 3
0
 def __call__(self, *args):
     """
     The main calling function. Resets recursive_call_depth and then calls
     """
     try:
         return RecursiveLOTHypothesis.__call__(self, *args)
     except RecursionDepthException:
         return ''
Exemplo n.º 4
0
 def __call__(self, *args):
     """
     The main calling function. Resets recursive_call_depth and then calls
     """
     try:
         return RecursiveLOTHypothesis.__call__(self, *args)
     except RecursionDepthException:
         return ""
Exemplo n.º 5
0
 def __call__(self, *args):
     try:
         return RecursiveLOTHypothesis.__call__(self, *args)
     except RecursionDepthException:
         return ''
Exemplo n.º 6
0
 def __init__(self, grammar=None, **kwargs):
     RecursiveLOTHypothesis.__init__(self, grammar=grammar, **kwargs)
Exemplo n.º 7
0
 def __init__(self, grammar=None, **kwargs):
     RecursiveLOTHypothesis.__init__(self, grammar, args=[], recurse_bound=25, maxnodes=100, **kwargs)
 def __init__(self, grammar=None, display="lambda recurse_: %s", **kwargs):
     RecursiveLOTHypothesis.__init__(self,
                                     grammar=grammar,
                                     display=display,
                                     **kwargs)
Exemplo n.º 9
0
 def __init__(self, grammar=None, display="lambda recurse_: %s", **kwargs):
     RecursiveLOTHypothesis.__init__(self, grammar=grammar, display=display, **kwargs)
Exemplo n.º 10
0
 def __call__(self, *args):
     try:
         return RecursiveLOTHypothesis.__call__(self, *args)
     except RecursionDepthException:
         return ''
Exemplo n.º 11
0
 def __init__(self, grammar=base_grammar, **kwargs):
     RecursiveLOTHypothesis.__init__(self, grammar, **kwargs)
Exemplo n.º 12
0
 def __init__(self, grammar=None, value=None, f=None, args=['x'], **kwargs):
     RecursiveLOTHypothesis.__init__(self, grammar, value=value, args=['x'], **kwargs)
Exemplo n.º 13
0
 def __init__(self, grammar=base_grammar, **kwargs):
     RecursiveLOTHypothesis.__init__(self, grammar, **kwargs)
Exemplo n.º 14
0
 def __init__(self, grammar, value=None, f=None, proposal_function=None, args=['x'], **kwargs):
     RecursiveLOTHypothesis.__init__(self, grammar, value=value, proposal_function=proposal_function, args=['x'], **kwargs)
Exemplo n.º 15
0
 def __init__(self, grammar=None, **kwargs):
     RecursiveLOTHypothesis.__init__(self, grammar, args=[], recurse_bound=20, maxnodes=100, **kwargs)
Exemplo n.º 16
0
 def __init__(self, grammar=None, value=None, f=None, gamma=-30, **kwargs):
     RecursiveLOTHypothesis.__init__(self, grammar, value=value, f=f, **kwargs)
     self.gamma = gamma
     self.lg1mgamma = log1mexp(gamma)
Exemplo n.º 17
0
 def __call__(self, *args):
     try:
         return RecursiveLOTHypothesis.__call__(self, *args)
     except EvaluationException:  # catch recursion and too big
         return None
Exemplo n.º 18
0
 def __call__(self, *args):
     try:
         return RecursiveLOTHypothesis.__call__(self, *args)
     except EvaluationException:  # catch recursion and too big
         return None
Exemplo n.º 19
0
 def __init__(self, *args, **kwargs):
     # Since we use flip, this must be an argument of a 'context' C that will manage the randomness. Note that
     # C is the last argument, so Cfirst=False below
     RecursiveLOTHypothesis.__init__(self, grammar=grammar, display="lambda recurse_, C: %s", *args, **kwargs)
Exemplo n.º 20
0
 def __init__(self, grammar=None, **kwargs):
     RecursiveLOTHypothesis.__init__(self, grammar=grammar, **kwargs)