3.1.12. cnfformula.families.tseitin module

Implementation of Tseitin formulas

class TseitinCmdHelper

Bases: object

Command line helper for Tseitin formulas

Methods

build_cnf(args) Build Tseitin formula according to the arguments
setup_command_line(parser) Setup the command line options for Tseitin formula
static build_cnf(args)

Build Tseitin formula according to the arguments

Arguments: - args: command line options

description = 'tseitin formula'
name = 'tseitin'
static setup_command_line(parser)

Setup the command line options for Tseitin formula

Arguments: - parser: parser to load with options.

TseitinFormula(graph, charges=None)

Build a Tseitin formula based on the input graph.

Odd charge is put on the first vertex by default, unless other vertices are is specified in input.

Arguments: - graph: input graph - `charges’: odd or even charge for each vertex