Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::SatCnfReader Class Reference

#include <sat_cnf_reader.h>

Public Member Functions

 SatCnfReader (bool wcnf_use_strong_slack=true)
 
 SatCnfReader (const SatCnfReader &)=delete
 This type is neither copyable nor movable.
 
SatCnfReaderoperator= (const SatCnfReader &)=delete
 
void InterpretCnfAsMaxSat (bool v)
 
bool Load (const std::string &filename, LinearBooleanProblem *problem)
 Loads the given cnf filename into the given proto.
 
bool Load (const std::string &filename, CpModelProto *problem)
 

Detailed Description

This class loads a file in cnf file format into a SatProblem. The format is described here: http://people.sc.fsu.edu/~jburkardt/data/cnf/cnf.html

It also support the wcnf input format for partial weighted max-sat problems.

Definition at line 145 of file sat_cnf_reader.h.

Constructor & Destructor Documentation

◆ SatCnfReader() [1/2]

operations_research::sat::SatCnfReader::SatCnfReader ( bool wcnf_use_strong_slack = true)
inlineexplicit

Definition at line 147 of file sat_cnf_reader.h.

◆ SatCnfReader() [2/2]

operations_research::sat::SatCnfReader::SatCnfReader ( const SatCnfReader & )
delete

This type is neither copyable nor movable.

Member Function Documentation

◆ InterpretCnfAsMaxSat()

void operations_research::sat::SatCnfReader::InterpretCnfAsMaxSat ( bool v)
inline

If called with true, then a cnf file will be converted to the max-sat problem: Try to minimize the number of unsatisfiable clauses.

Definition at line 157 of file sat_cnf_reader.h.

◆ Load() [1/2]

bool operations_research::sat::SatCnfReader::Load ( const std::string & filename,
CpModelProto * problem )
inline

Definition at line 166 of file sat_cnf_reader.h.

◆ Load() [2/2]

bool operations_research::sat::SatCnfReader::Load ( const std::string & filename,
LinearBooleanProblem * problem )
inline

Loads the given cnf filename into the given proto.

Definition at line 160 of file sat_cnf_reader.h.

◆ operator=()

SatCnfReader & operations_research::sat::SatCnfReader::operator= ( const SatCnfReader & )
delete

The documentation for this class was generated from the following file: