Exemplo n.º 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])
             ])
         ])
Exemplo n.º 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'
Exemplo n.º 3
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])]
             )
         ],
     )
Exemplo n.º 4
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"
Exemplo n.º 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'
Exemplo n.º 6
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"