Skip to main content

parse_dimacs_kernel

Function parse_dimacs_kernel 

Source
pub(crate) fn parse_dimacs_kernel(input: &str) -> Result<Kernel, DimacsError>
Expand description

解析 DIMACS CNF 文本并构造 Kernel

输入约定:

  • 头部:p cnf <vars> <clauses>
  • 子句:以 0 结束
  • c 开头行为注释

例: p cnf 3 2 1 -2 0 2 3 0