本文整理汇总了C++中Proxy::getNormalizedClauses方法的典型用法代码示例。如果您正苦于以下问题:C++ Proxy::getNormalizedClauses方法的具体用法?C++ Proxy::getNormalizedClauses怎么用?C++ Proxy::getNormalizedClauses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Proxy
的用法示例。
在下文中一共展示了Proxy::getNormalizedClauses方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newnode
//.........这里部分代码省略.........
continue;
case VALID:
// goal node, print solution
PrintSolution(pnode);
PrintRenameVariables(pnode);
// check if more than one solutions is required
solutionsfound += 1;
statistics[SolutionsFound] += 1;
totalstatistics[TotalSolutionsFound] += 1;
if (solutionsfound >= solutionsrequired)
return(VALID);
continue;
case MAXCLAUSEEXCEEDED:
// check if any solutions were found
if (solutionsfound > 0)
return(VALID);
else
return(NOTPROVEN);
default:
// some type of error
ERRORD("isGoal() failed.", status, errno);
return(status);
}
// generate the children of the current node
if ((status = pnode->expand(startlist, otherlist)) != OK)
{
ERRORD("expand() failed.", status, errno);
return(status);
}
// set up links to parent and calculate the heuristic value
ListIterator<Proxy<NodeType> >
childrenIter(*pnode->getChildren());
for ( ; !childrenIter.done(); childrenIter++)
{
// pointer to child
Proxy<NodeType> pchild(childrenIter());
// set up link to parent
if (reporttype == ReportParent ||
reporttype == ReportBoth)
pchild->setParent(pnode);
// insert into queue
if (!bfswithchecks)
{
pchild->setDepth(nodedepth+1);
if ((status = openpq.insertAtEnd(
pchild)) != OK)
{
ERRORD("insertAtEnd() failed.",
status, errno);
return(status);
}
}
else
{
statistics[RedundantClauseTestsAttempted] += 1;
totalstatistics[TotalRedundantClauseTestsAttempted] += 1;
String newnode(pchild->getNormalizedClauses());
if (allstates.retrieve(newnode) == NOMATCH)
{
pchild->setDepth(nodedepth+1);
if ((status = openpq.insertAtEnd(
pchild)) != OK)
{
ERRORD("insertAtEnd() failed.",
status, errno);
return(status);
}
}
else
{
statistics[RedundantClausesRejected] += 1;
totalstatistics[TotalRedundantClausesRejected] += 1;
}
}
}
if (bfswithchecks)
{
if (allstates.insert(pnode->getNormalizedClauses()) != OK)
{
ERRORD("insert() failed.", status, errno);
return(status);
}
}
}
// check if any solutions were found
if (solutionsfound > 0)
return(VALID);
else
return(NOTPROVEN);
}