KineticLawIdentifier.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:libSigNetSim 作者: vincent-noel 项目源码 文件源码
def isReversible(self, formula):

        formula = expand(formula)
        # If we had an addition
        if formula.func == SympyAdd:

            # And one of the terms
            for arg in formula.args:

                # is *(-1)
                if (arg.func == SympyMul
                    and (arg.args[0] == SympyInteger(-1)
                        or arg.args[1] == SympyInteger(-1))):

                    return True

        return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号