add a way to copy a log var
This commit is contained in:
parent
4ade4945a0
commit
2061eefda2
@ -856,6 +856,21 @@ ConstraintTree::ground (LogVar X)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ConstraintTree::copyLogVar (LogVar X_1, LogVar X_2)
|
||||||
|
{
|
||||||
|
moveToBottom ({X_1});
|
||||||
|
CTNodes leafs = getNodesAtLevel (logVars_.size());
|
||||||
|
for (unsigned i = 0; i < leafs.size(); i++) {
|
||||||
|
leafs[i]->childs().push_back (
|
||||||
|
new CTNode (leafs[i]->symbol(), leafs[i]->level() + 1));
|
||||||
|
}
|
||||||
|
logVars_.push_back (X_2);
|
||||||
|
logVarSet_.insert (X_2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
ConstraintTree::countTuples (const CTNode* n) const
|
ConstraintTree::countTuples (const CTNode* n) const
|
||||||
{
|
{
|
||||||
|
@ -207,6 +207,8 @@ class ConstraintTree
|
|||||||
LogVars expand (LogVar);
|
LogVars expand (LogVar);
|
||||||
|
|
||||||
ConstraintTrees ground (LogVar);
|
ConstraintTrees ground (LogVar);
|
||||||
|
|
||||||
|
void copyLogVar (LogVar,LogVar);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned countTuples (const CTNode*) const;
|
unsigned countTuples (const CTNode*) const;
|
||||||
|
Reference in New Issue
Block a user