本文整理汇总了C++中SatClause::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ SatClause::push_back方法的具体用法?C++ SatClause::push_back怎么用?C++ SatClause::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SatClause
的用法示例。
在下文中一共展示了SatClause::push_back方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: toSatClause
void MinisatSatSolver::toSatClause(Minisat::vec<Minisat::Lit>& clause,
SatClause& sat_clause) {
for (int i = 0; i < clause.size(); ++i) {
sat_clause.push_back(toSatLiteral(clause[i]));
}
Assert((unsigned)clause.size() == sat_clause.size());
}
示例2: toSatClause
void CryptoMinisatSolver::toSatClause(std::vector<CMSat::Lit>& clause,
SatClause& sat_clause) {
for (unsigned i = 0; i < clause.size(); ++i) {
sat_clause.push_back(toSatLiteral(clause[i]));
}
Assert(clause.size() == sat_clause.size());
}
示例3: explainPropagation
void TheoryProxy::explainPropagation(SatLiteral l, SatClause& explanation) {
TNode lNode = d_cnfStream->getNode(l);
Debug("prop-explain") << "explainPropagation(" << lNode << ")" << std::endl;
Node theoryExplanation = d_theoryEngine->getExplanation(lNode);
Debug("prop-explain") << "explainPropagation() => " << theoryExplanation << std::endl;
if (theoryExplanation.getKind() == kind::AND) {
Node::const_iterator it = theoryExplanation.begin();
Node::const_iterator it_end = theoryExplanation.end();
explanation.push_back(l);
for (; it != it_end; ++ it) {
explanation.push_back(~d_cnfStream->getLiteral(*it));
}
} else {
explanation.push_back(l);
explanation.push_back(~d_cnfStream->getLiteral(theoryExplanation));
}
}
示例4: getUnsatCore
void BVMinisatSatSolver::getUnsatCore(SatClause& unsatCore) {
// TODO add assertion to check the call was after an unsat call
for (int i = 0; i < d_minisat->conflict.size(); ++i) {
unsatCore.push_back(toSatLiteral(d_minisat->conflict[i]));
}
}