Exemple #1
0
 def __init__(self, chainer):
     A = chainer.new_variable()
     B = chainer.new_variable()
     Rule.__init__(self, formula=formulas.identityFormula,
         outputs= [chainer.link(types.PredictiveAttractionLink, [A, B])],
         inputs= [chainer.link(types.AndLink, [
             chainer.link(types.AttractionLink, [A, B]),
             chainer.link(types.BeforeLink, [A, B])
             ])
         ])
Exemple #2
0
    def __init__(self, chainer, link_type, formula= formulas.deductionSimpleFormula):
        A = chainer.new_variable()
        B = chainer.new_variable()
        C = chainer.new_variable()

        Rule.__init__(self, formula=formula,
            outputs= [chainer.link(link_type, [A, C])],
            inputs=  [chainer.link(link_type, [A, B]),
                      chainer.link(link_type, [B, C])]
            )

        self.name = get_type_name(link_type) + 'TransitivityRule'
 def __init__(self, chainer):
     A = chainer.new_variable()
     B = chainer.new_variable()
     Rule.__init__(
         self,
         formula=formulas.identityFormula,
         outputs=[chainer.link(types.PredictiveAttractionLink, [A, B])],
         inputs=[
             chainer.link(
                 types.AndLink, [chainer.link(types.AttractionLink, [A, B]), chainer.link(types.BeforeLink, [A, B])]
             )
         ],
     )
    def __init__(self, chainer, link_type, formula=formulas.deductionSimpleFormula):
        A = chainer.new_variable()
        B = chainer.new_variable()
        C = chainer.new_variable()

        Rule.__init__(
            self,
            formula=formula,
            outputs=[chainer.link(link_type, [A, C])],
            inputs=[chainer.link(link_type, [A, B]), chainer.link(link_type, [B, C])],
        )

        self.name = get_type_name(link_type) + "TransitivityRule"
Exemple #5
0
    def __init__(self, chainer, link_type, formula):
        A = chainer.new_variable()
        B = chainer.new_variable()
        ta = chainer.new_variable()
        tb = chainer.new_variable()

        Rule.__init__(self,
            formula= formula,
            outputs= [chainer.link(link_type, [A, B])],
            inputs=  [chainer.link(types.AtTimeLink, [ta, A]),
                      chainer.link(types.AtTimeLink, [tb, B])])

        self.name = get_type_name(link_type) + 'EvaluationRule'
    def __init__(self, chainer, link_type, formula):
        A = chainer.new_variable()
        B = chainer.new_variable()
        ta = chainer.new_variable()
        tb = chainer.new_variable()

        Rule.__init__(
            self,
            formula=formula,
            outputs=[chainer.link(link_type, [A, B])],
            inputs=[chainer.link(types.AtTimeLink, [ta, A]), chainer.link(types.AtTimeLink, [tb, B])],
        )

        self.name = get_type_name(link_type) + "EvaluationRule"