add assignement operator to ConstraintTree
This commit is contained in:
parent
d07ea73050
commit
b6df8a66b1
@ -187,9 +187,7 @@ ConstraintTree::ConstraintTree (
|
||||
|
||||
ConstraintTree::ConstraintTree (const ConstraintTree& ct)
|
||||
{
|
||||
root_ = CTNode::copySubtree (ct.root_);
|
||||
logVars_ = ct.logVars_;
|
||||
logVarSet_ = ct.logVarSet_;
|
||||
*this = ct;
|
||||
}
|
||||
|
||||
|
||||
@ -875,6 +873,19 @@ ConstraintTree::copyLogVar (LogVar X_1, LogVar X_2)
|
||||
|
||||
|
||||
|
||||
ConstraintTree&
|
||||
ConstraintTree::operator= (const ConstraintTree& ct)
|
||||
{
|
||||
if (this != &ct) {
|
||||
root_ = CTNode::copySubtree (ct.root_);
|
||||
logVars_ = ct.logVars_;
|
||||
logVarSet_ = ct.logVarSet_;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
unsigned
|
||||
ConstraintTree::countTuples (const CTNode* n) const
|
||||
{
|
||||
|
@ -199,6 +199,8 @@ class ConstraintTree
|
||||
ConstraintTrees ground (LogVar);
|
||||
|
||||
void copyLogVar (LogVar,LogVar);
|
||||
|
||||
ConstraintTree& operator= (const ConstraintTree& ct);
|
||||
|
||||
private:
|
||||
unsigned countTuples (const CTNode*) const;
|
||||
|
Reference in New Issue
Block a user