コード例 #1
0
ファイル: pebbling.py プロジェクト: louisabraham/cnfgen
    def setup_command_line(parser):
        """Setup the command line options for pebbling formulas

        Arguments:
        - `parser`: parser to load with options.
        """
        DirectedAcyclicGraphHelper.setup_command_line(parser)
コード例 #2
0
ファイル: pebbling.py プロジェクト: MassimoLauria/cnfgen
    def setup_command_line(parser):
        """Setup the command line options for pebbling formulas

        Arguments:
        - `parser`: parser to load with options.
        """
        DirectedAcyclicGraphHelper.setup_command_line(parser)
コード例 #3
0
ファイル: pebbling.py プロジェクト: louisabraham/cnfgen
    def setup_command_line(parser):
        """Setup the command line options for stone formulas

        Arguments:
        - `parser`: parser to load with options.
        """
        DirectedAcyclicGraphHelper.setup_command_line(parser)
        BipartiteGraphHelper.setup_command_line(parser, suffix="_mapping")
コード例 #4
0
ファイル: pebbling.py プロジェクト: MassimoLauria/cnfgen
    def setup_command_line(parser):
        """Setup the command line options for stone formulas

        Arguments:
        - `parser`: parser to load with options.
        """
        DirectedAcyclicGraphHelper.setup_command_line(parser)
        BipartiteGraphHelper.setup_command_line(parser,suffix="_mapping")
コード例 #5
0
ファイル: pebbling.py プロジェクト: lizzij/LCProj
    def setup_command_line(parser):
        """Setup the command line options for stone formulas

        Arguments:
        - `parser`: parser to load with options.
        """
        DirectedAcyclicGraphHelper.setup_command_line(parser)
        parser.add_argument('s',metavar='<s>',type=int,help="number of stones")
コード例 #6
0
ファイル: pebbling.py プロジェクト: StephanGocht/cnfgen
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D = DirectedAcyclicGraphHelper.obtain_graph(args)
        return StoneFormula(D, args.s)
コード例 #7
0
ファイル: pebbling.py プロジェクト: StephanGocht/cnfgen
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D = DirectedAcyclicGraphHelper.obtain_graph(args)
        B = BipartiteGraphHelper.obtain_graph(args, suffix="_mapping")
        return SparseStoneFormula(D, B)
コード例 #8
0
ファイル: pebbling.py プロジェクト: louisabraham/cnfgen
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D = DirectedAcyclicGraphHelper.obtain_graph(args)
        try:
            return StoneFormula(D, args.s)
        except ValueError as e:
            print("\nError: {}".format(e), file=sys.stderr)
            sys.exit(-1)
コード例 #9
0
ファイル: pebbling.py プロジェクト: MassimoLauria/cnfgen
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D= DirectedAcyclicGraphHelper.obtain_graph(args)
        try:
            return StoneFormula(D,args.s)
        except ValueError,e :
            print("\nError: {}".format(e),file=sys.stderr)
            sys.exit(-1)
コード例 #10
0
ファイル: pebbling.py プロジェクト: chansonyhu/cnfgen
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D= DirectedAcyclicGraphHelper.obtain_graph(args)
        try:
            return StoneFormula(D,args.s)
        except ValueError:
            print("\nError: Input graph must be a DAG, and a non negative # of stones.",file=sys.stderr)
            sys.exit(-1)
コード例 #11
0
ファイル: pebbling.py プロジェクト: chansonyhu/cnfgen
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D= DirectedAcyclicGraphHelper.obtain_graph(args)
        try:
            return PebblingFormula(D)
        except ValueError:
            print("\nError: input graph must be directed and acyclic.",file=sys.stderr)
            sys.exit(-1)
コード例 #12
0
ファイル: pebbling.py プロジェクト: lizzij/LCProj
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D= DirectedAcyclicGraphHelper.obtain_graph(args)
        B= BipartiteGraphHelper.obtain_graph(args,suffix="_mapping")
        try:
            return SparseStoneFormula(D,B)
        except ValueError,e:
            print("\nError: {}".format(e),file=sys.stderr)
            sys.exit(-1)