我正在努力做一些关于2-SAT和3-SAT的作业,我被允许在网上搜索该计划的实施情况。我在Python中遇到了两个基本上我可以运行的程序,它们使我能够继续我的任务。但是,我无法从一个程序获得输出,以供另一个程序使用:
这里的代码:http://goo.gl/6fdlq应该为这里的代码提供输入:http://goo.gl/rdfyR 说明书上是这么说的:
Problem generator in Python - Generates either C syntax expressions or the input to... Fully functional GSAT solver in Python - takes input from the above and attempts to satisfy it, while generating a log of the output intended to be instructional to those unfamiliar with the GSAT algorithm.
谁能告诉我怎么做?在
您要做的是将第一个脚本的输出管道到第二个脚本中。在
由于脚本似乎分别命名为
3sat.py
和gsat.py
,所以只需cd
到它们所在的目录并运行:或者,相当于:
^{pr2}$相关问题 更多 >
编程相关推荐