本文整理汇总了Python中cnfformula.cmdline.SimpleGraphHelper.setup_command_line方法的典型用法代码示例。如果您正苦于以下问题:Python SimpleGraphHelper.setup_command_line方法的具体用法?Python SimpleGraphHelper.setup_command_line怎么用?Python SimpleGraphHelper.setup_command_line使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cnfformula.cmdline.SimpleGraphHelper
的用法示例。
在下文中一共展示了SimpleGraphHelper.setup_command_line方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup_command_line
# 需要导入模块: from cnfformula.cmdline import SimpleGraphHelper [as 别名]
# 或者: from cnfformula.cmdline.SimpleGraphHelper import setup_command_line [as 别名]
def setup_command_line(parser):
"""Setup the command line options for graph automorphism formula
Arguments:
- `parser`: parser to load with options.
"""
SimpleGraphHelper.setup_command_line(parser)
示例2: setup_command_line
# 需要导入模块: from cnfformula.cmdline import SimpleGraphHelper [as 别名]
# 或者: from cnfformula.cmdline.SimpleGraphHelper import setup_command_line [as 别名]
def setup_command_line(parser):
"""Setup the command line options for Perfect Matching Principle formula
Arguments:
- `parser`: parser to load with options.
"""
SimpleGraphHelper.setup_command_line(parser)
示例3: setup_command_line
# 需要导入模块: from cnfformula.cmdline import SimpleGraphHelper [as 别名]
# 或者: from cnfformula.cmdline.SimpleGraphHelper import setup_command_line [as 别名]
def setup_command_line(parser):
"""Setup the command line options for k-color formula
Arguments:
- `parser`: parser to load with options.
"""
parser.add_argument('k',metavar='<k>',type=int,action='store',help="number of available colors")
SimpleGraphHelper.setup_command_line(parser)
示例4: setup_command_line
# 需要导入模块: from cnfformula.cmdline import SimpleGraphHelper [as 别名]
# 或者: from cnfformula.cmdline.SimpleGraphHelper import setup_command_line [as 别名]
def setup_command_line(parser):
"""Setup the command line options for k-clique formula
Arguments:
- `parser`: parser to load with options.
"""
parser.add_argument('k',metavar='<k>',type=int,action='store',help="size of the clique to be found")
SimpleGraphHelper.setup_command_line(parser)
示例5: setup_command_line
# 需要导入模块: from cnfformula.cmdline import SimpleGraphHelper [as 别名]
# 或者: from cnfformula.cmdline.SimpleGraphHelper import setup_command_line [as 别名]
def setup_command_line(parser):
"""Setup the command line options for dominating set formula
Arguments:
- `parser`: parser to load with options.
"""
parser.add_argument('d',metavar='<d>',type=int,action='store',help="size of the dominating set")
parser.add_argument('--alternative','-a',action='store_true',default=False,help="produce the provably hard version")
SimpleGraphHelper.setup_command_line(parser)
示例6: setup_command_line
# 需要导入模块: from cnfformula.cmdline import SimpleGraphHelper [as 别名]
# 或者: from cnfformula.cmdline.SimpleGraphHelper import setup_command_line [as 别名]
def setup_command_line(parser):
"""Setup the command line options for dominating set formula
Arguments:
- `parser`: parser to load with options.
"""
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('--d',metavar='<d>',type=int,action='store',help="size of the cover")
group.add_argument('--rational',action='store_true',help="Set size to V/2")
group.add_argument('--no-rational',action='store_true',help="Set size to V/2-1")
SimpleGraphHelper.setup_command_line(parser)
示例7: setup_command_line
# 需要导入模块: from cnfformula.cmdline import SimpleGraphHelper [as 别名]
# 或者: from cnfformula.cmdline.SimpleGraphHelper import setup_command_line [as 别名]
def setup_command_line(parser):
"""Setup the command line options for dominating set formula
Arguments:
- `parser`: parser to load with options.
"""
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('--d',metavar='<d>',type=int,action='store',help="size of the dominating set")
group.add_argument('--regular',action='store_true',help="Set size to V/(deg+1)")
group.add_argument('--tiling',action='store_true',help="Add tiling constraints")
parser.add_argument('--seed',action='store_true',help="Set some vertex to true")
SimpleGraphHelper.setup_command_line(parser)
示例8: setup_command_line
# 需要导入模块: from cnfformula.cmdline import SimpleGraphHelper [as 别名]
# 或者: from cnfformula.cmdline.SimpleGraphHelper import setup_command_line [as 别名]
def setup_command_line(parser):
"""Setup the command line options for Graph ordering principle formula
Arguments:
- `parser`: parser to load with options.
"""
g=parser.add_mutually_exclusive_group()
g.add_argument('--total','-t',default=False,action='store_true',help="assume a total order")
g.add_argument('--smart','-s',default=False,action='store_true',help="encode 'x<y' and 'x>y' in a single variable (implies totality)")
g.add_argument('--knuth2', action='store_const', dest='knuth',const=2,
help="transitivity axioms: \"(i<j)(j<k)->(i,k)\" only for j>i,k")
g.add_argument('--knuth3', action='store_const', dest='knuth',const=3,
help="transitivity axioms: \"(i<j)(j<k)->(i,k)\" only for k>i,j")
parser.add_argument('--plant','-p',default=False,action='store_true',help="allow a minimum element")
SimpleGraphHelper.setup_command_line(parser)
示例9: setup_command_line
# 需要导入模块: from cnfformula.cmdline import SimpleGraphHelper [as 别名]
# 或者: from cnfformula.cmdline.SimpleGraphHelper import setup_command_line [as 别名]
def setup_command_line(parser):
"""Setup the command line options for Tseitin formula
Arguments:
- `parser`: parser to load with options.
"""
parser.add_argument('--charge',metavar='<charge>',default='first',
choices=['first','random','randomodd','randomeven'],
help="""charge on the vertices.
`first' puts odd charge on first vertex;
`random' puts a random charge on vertices;
`randomodd' puts random odd charge on vertices;
`randomeven' puts random even charge on vertices.
""")
SimpleGraphHelper.setup_command_line(parser)